mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-03 11:42:28 +00:00
Fix variable used to index polymorphic parameter.
This commit is contained in:
@@ -6796,7 +6796,7 @@ gb_internal CallArgumentError check_polymorphic_record_type(CheckerContext *c, O
|
||||
isize index = lookup_polymorphic_record_parameter(original_type, name);
|
||||
if (index >= 0) {
|
||||
TypeTuple *params = get_record_polymorphic_params(original_type);
|
||||
Entity *e = params->variables[i];
|
||||
Entity *e = params->variables[index];
|
||||
if (e->kind == Entity_Constant) {
|
||||
check_expr_with_type_hint(c, &operands[i], fv->value, e->type);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user