From f8a7071069f485f8a88f2be327494b003420939d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tesa=C5=99?= Date: Sun, 9 Aug 2026 00:06:30 +0200 Subject: [PATCH] Check identical specialization --- src/check_builtin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp index 5dd4cf290..4910dafb0 100644 --- a/src/check_builtin.cpp +++ b/src/check_builtin.cpp @@ -7370,7 +7370,11 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As operand->mode = Addressing_Constant; operand->type = t_untyped_bool; - operand->value = exact_value_bool(check_type_specialization_to(c, s, t, false, false)); + bool is_specialization = false; + if (!are_types_identical(s, t)) { + is_specialization = check_type_specialization_to(c, s, t, false, false); + } + operand->value = exact_value_bool(is_specialization); } break;