From 47023b2e6c8516800e17579c651798eec2b013e4 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 26 Sep 2023 13:04:47 +0100 Subject: Fix #2812 --- src/check_builtin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/check_builtin.cpp') diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp index 2e65c5750..851665cb2 100644 --- a/src/check_builtin.cpp +++ b/src/check_builtin.cpp @@ -2120,7 +2120,7 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As return false; } Type *t = o.type; - if (t == nullptr || t == t_invalid || is_type_asm_proc(o.type) || is_type_polymorphic(operand->type)) { + if (t == nullptr || t == t_invalid || is_type_asm_proc(t) || is_type_polymorphic(t)) { error(ce->args[0], "Invalid argument for '%.*s'", LIT(builtin_name)); return false; } -- cgit v1.2.3