aboutsummaryrefslogtreecommitdiff
path: root/src/check_builtin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_builtin.cpp')
-rw-r--r--src/check_builtin.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index 859fbea28..1c13b6b5e 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -3126,13 +3126,11 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
}
- if (string_set_exists(&name_set, name)) {
+ if (string_set_update(&name_set, name)) {
error(op.expr, "Field argument name '%.*s' already exists", LIT(name));
} else {
array_add(&types, arg_type->Slice.elem);
array_add(&names, name);
-
- string_set_add(&name_set, name);
}
}