From 8e263de4aa2a48cb26bf235bdad162de5c1547c8 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 11 May 2024 13:59:06 +0100 Subject: Fix error message handling --- src/check_decl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/check_decl.cpp') diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 441c8000d..1ec366ae7 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -1619,7 +1619,7 @@ gb_internal bool check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *de if (e->kind != Entity_Variable) { continue; } - if (is_type_polymorphic(e->type)) { + if (is_type_polymorphic(e->type) && is_type_polymorphic_record_unspecialized(e->type)) { gbString s = type_to_string(e->type); char const *msg = "Unspecialized polymorphic types are not allowed in procedure parameters, got %s"; if (e->Variable.type_expr) { -- cgit v1.2.3