mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-09 06:12:05 -04:00
Fix compiler segfault on a bare in a type position call
This commit is contained in:
1 parent
580b3f15cd
commit
ef1c5fe675
5 files changed
+61
-6
No files matched your search
+4
-5
@@ -8309,6 +8309,10 @@ gb_internal CallArgumentError check_polymorphic_record_type(CheckerContext *c, O
|
||||
|
||||
bool named_fields = false;
|
||||
{
|
||||
if (ce->ellipsis.pos.line != 0) {
|
||||
error(ce->ellipsis, "Invalid use of '..' in a polymorphic type call");
|
||||
}
|
||||
|
||||
// NOTE(bill, 2019-10-26): Allow a cycle in the parameters but not in the fields themselves
|
||||
auto prev_type_path = c->type_path;
|
||||
|
||||
@@ -8347,11 +8351,6 @@ gb_internal CallArgumentError check_polymorphic_record_type(CheckerContext *c, O
|
||||
check_expr_or_type(c, &operands[i], fv->value);
|
||||
}
|
||||
|
||||
bool vari_expand = (ce->ellipsis.pos.line != 0);
|
||||
if (vari_expand) {
|
||||
error(ce->ellipsis, "Invalid use of '..' in a polymorphic type call'");
|
||||
}
|
||||
|
||||
} else {
|
||||
operands = array_make<Operand>(temporary_allocator(), 0, 2*ce->args.count);
|
||||
|
||||
|
||||
Reference in new issue
Block a user