From 8ff9f2e44f6a92ae5429bac257b4fb94829e9fd3 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 13 Aug 2021 11:49:52 +0100 Subject: Fix #1077 --- src/check_expr.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/check_expr.cpp') diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 17ad25c58..cb9fce7b6 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -5599,6 +5599,8 @@ CallArgumentError check_polymorphic_record_type(CheckerContext *c, Operand *oper } if (minimum_param_count != param_count) { + array_resize(&ordered_operands, param_count); + isize missing_count = 0; // NOTE(bill): Replace missing operands with the default values (if possible) for_array(i, ordered_operands) { @@ -5613,6 +5615,11 @@ CallArgumentError check_polymorphic_record_type(CheckerContext *c, Operand *oper if (e->Constant.param_value.kind == ParameterValue_Constant) { o->value = e->Constant.param_value.value; } + } else if (e->kind == Entity_TypeName) { + missing_count += 1; + o->mode = Addressing_Type; + o->type = e->type; + o->expr = e->identifier; } } } -- cgit v1.2.3