mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-15 15:44:04 +00:00
Fix odin version printing
This commit is contained in:
@@ -1166,7 +1166,7 @@ Type *check_get_params(Checker *c, Scope *scope, AstNode *_params, bool *is_vari
|
||||
success = false;
|
||||
}
|
||||
} else {
|
||||
type = make_type_generic(c->allocator, 0);
|
||||
type = make_type_generic(c->allocator, 0, str_lit(""));
|
||||
}
|
||||
} else {
|
||||
type = check_type(c, type_expr);
|
||||
|
||||
@@ -375,7 +375,7 @@ int main(int arg_count, char **arg_ptr) {
|
||||
return 1;
|
||||
#endif
|
||||
} else if (args[1] == "version") {
|
||||
gb_printf("%s version %.*s\n", args[0], LIT(build_context.ODIN_VERSION));
|
||||
gb_printf("%.*s version %.*s\n", LIT(args[0]), LIT(build_context.ODIN_VERSION));
|
||||
return 0;
|
||||
} else {
|
||||
usage(args[0]);
|
||||
|
||||
@@ -117,7 +117,7 @@ struct TypeRecord {
|
||||
|
||||
#define TYPE_KINDS \
|
||||
TYPE_KIND(Basic, BasicType) \
|
||||
TYPE_KIND(Generic, struct{ i64 id; }) \
|
||||
TYPE_KIND(Generic, struct{ i64 id; String name; }) \
|
||||
TYPE_KIND(Pointer, struct { Type *elem; }) \
|
||||
TYPE_KIND(Atomic, struct { Type *elem; }) \
|
||||
TYPE_KIND(Array, struct { Type *elem; i64 count; }) \
|
||||
@@ -478,9 +478,10 @@ Type *make_type_basic(gbAllocator a, BasicType basic) {
|
||||
return t;
|
||||
}
|
||||
|
||||
Type *make_type_generic(gbAllocator a, i64 id) {
|
||||
Type *make_type_generic(gbAllocator a, i64 id, String name) {
|
||||
Type *t = alloc_type(a, Type_Generic);
|
||||
t->Generic.id = id;
|
||||
t->Generic.name = name;
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user