From 8f4ab3c07dd8c9cc5c188203f718eed3942bbe8b Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 8 Feb 2024 13:49:27 +0000 Subject: Add check for a procedure --- src/check_type.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/check_type.cpp') diff --git a/src/check_type.cpp b/src/check_type.cpp index 856e31cee..d216ae3e6 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -537,7 +537,10 @@ gb_internal Type *check_record_polymorphic_params(CheckerContext *ctx, Ast *poly e->TypeName.is_type_alias = true; e->flags |= EntityFlag_PolyConst; } else { - Type *t = determine_type_from_polymorphic(ctx, type, operand); + Type *t = operand.type; + if (is_type_proc(type)) { + t = determine_type_from_polymorphic(ctx, type, operand); + } if (is_type_polymorphic(base_type(t))) { *is_polymorphic_ = true; can_check_fields = false; -- cgit v1.2.3