return TYPE_MATCH_SUCCESS;
}
}
+
+ // String literals implicitly become c-strings for convience.
+ if (node->kind == Ast_Kind_StrLit
+ && type->kind == Type_Kind_MultiPointer
+ && type->MultiPointer.elem == &basic_types[Basic_Kind_U8]) {
+
+ if (permanent) {
+ AstStrLit *strlit = (AstStrLit *) node;
+ strlit->is_cstr = 1;
+ strlit->type = type;
+ }
+
+ return TYPE_MATCH_SUCCESS;
+ }
// If the destination type is a slice, then automatically convert arrays, dynamic
// arrays, and var args, if they are the same type. This is big convenience feature
}
dep := string.as_str(args[0]);
+ if config.dependencies->has(dep) {
+ dep = config.dependencies->get(dep)->unwrap().source.Git->unwrap();
+ }
info_print("Rebuild", "{}\n", dep);
if success, err := rebuild_native_library(dep); success {
if !os.dir_exists(".git") {
error_print("Not in Git repository.\n");
printf("It does not look like you are in a Git repository. In order to publish packages\n");
- printf("with onyx-pkg, you have to initailize a Git repository in the current directory.\n\n");
+ printf("with onyx-pkg, you have to initialize a Git repository in the current directory.\n\n");
return;
}