mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 09:54:45 +00:00
Merge pull request #4130 from fusion32/fix-ambiguous-generic-type-names
fix ambiguous generic type names
This commit is contained in:
@@ -7629,7 +7629,7 @@ gb_internal CallArgumentError check_polymorphic_record_type(CheckerContext *c, O
|
||||
gbString s = gb_string_make_reserve(heap_allocator(), e->token.string.len+3);
|
||||
s = gb_string_append_fmt(s, "%.*s(", LIT(e->token.string));
|
||||
|
||||
TypeTuple *tuple = get_record_polymorphic_params(e->type);
|
||||
TypeTuple *tuple = get_record_polymorphic_params(bt);
|
||||
if (tuple != nullptr) for_array(i, tuple->variables) {
|
||||
Entity *v = tuple->variables[i];
|
||||
String name = v->token.string;
|
||||
@@ -7644,8 +7644,10 @@ gb_internal CallArgumentError check_polymorphic_record_type(CheckerContext *c, O
|
||||
s = write_type_to_string(s, v->type, false);
|
||||
}
|
||||
} else if (v->kind == Entity_Constant) {
|
||||
s = gb_string_append_fmt(s, "=");
|
||||
s = write_exact_value_to_string(s, v->Constant.value);
|
||||
if (v->Constant.value.kind != ExactValue_Invalid) {
|
||||
s = gb_string_append_fmt(s, "=");
|
||||
s = write_exact_value_to_string(s, v->Constant.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
s = gb_string_append_fmt(s, ")");
|
||||
|
||||
Reference in New Issue
Block a user