check operand type in any_int params

This commit is contained in:
jakubtomsu
2026-05-27 19:10:34 +02:00
parent edbbe4be92
commit 46bb13d0bd

View File

@@ -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);
}
}