aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
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 012c50270..86b4f3aee 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -7886,8 +7886,8 @@ gb_internal CallArgumentError check_polymorphic_record_type(CheckerContext *c, O
GenTypesData *found_gen_types = ensure_polymorphic_record_entity_has_gen_types(c, original_type);
mutex_lock(&found_gen_types->mutex);
- defer (mutex_unlock(&found_gen_types->mutex));
Entity *found_entity = find_polymorphic_record_entity(found_gen_types, param_count, ordered_operands);
+ mutex_unlock(&found_gen_types->mutex);
if (found_entity) {
operand->mode = Addressing_Type;