From 46bb13d0bd55e410c7dbdebf0d7408edf5966eb1 Mon Sep 17 00:00:00 2001 From: jakubtomsu <66876057+jakubtomsu@users.noreply.github.com> Date: Wed, 27 May 2026 19:10:34 +0200 Subject: [PATCH] check operand type in any_int params --- src/check_expr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/check_expr.cpp b/src/check_expr.cpp index ed2115a30..8681d22ba 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -6724,7 +6724,7 @@ gb_internal CallArgumentError check_call_arguments_internal(CheckerContext *c, A if (!check_is_assignable_to_with_score(c, o, param_type, &s, param_is_variadic, allow_array_programming)) { bool ok = false; if (e && (e->flags & EntityFlag_AnyInt)) { - if (is_type_integer(param_type)) { + if (is_type_integer(param_type) && (is_type_integer(o->type) || is_type_enum(o->type))) { ok = check_is_castable_to(c, o, param_type); } }