diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-13 11:49:52 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-13 11:49:52 +0100 |
| commit | 8ff9f2e44f6a92ae5429bac257b4fb94829e9fd3 (patch) | |
| tree | ae918ea3dcfa22a47b95e45ebf1a463557e7bb92 /src/check_expr.cpp | |
| parent | 799a56bbcb5146697ce01442b190fabc07b6dc0b (diff) | |
Fix #1077
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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; } } } |