diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 0911e48cf..c5517ffa3 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -6847,7 +6847,7 @@ gb_internal CallArgumentError check_polymorphic_record_type(CheckerContext *c, O Array ordered_operands = operands; if (!named_fields) { - ordered_operands = array_make(permanent_allocator(), param_count); + ordered_operands = array_make(permanent_allocator(), operands.count); array_copy(&ordered_operands, operands, 0); } else { TEMPORARY_ALLOCATOR_GUARD();