aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorrick-masters <grick23@gmail.com>2024-03-12 23:57:13 +0000
committerrick-masters <grick23@gmail.com>2024-03-12 23:57:13 +0000
commitf7ec628cb20375645f99a851d55e031c76688724 (patch)
tree6cbd5867b2550fbc2d55c262fb93e15131db3a6f /src/check_expr.cpp
parent23f3898b4efdc3003f8b89d64fcadd638b852bd9 (diff)
Fix check for too many arguments to a polymorphic record type.
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp2
1 files changed, 1 insertions, 1 deletions
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<Operand> ordered_operands = operands;
if (!named_fields) {
- ordered_operands = array_make<Operand>(permanent_allocator(), param_count);
+ ordered_operands = array_make<Operand>(permanent_allocator(), operands.count);
array_copy(&ordered_operands, operands, 0);
} else {
TEMPORARY_ALLOCATOR_GUARD();