Fix bit_set upper endpoint representability check

This commit is contained in:
Michael Tesař
2026-08-16 00:30:42 +02:00
parent d511234bf4
commit b17c10162d
3 changed files with 12 additions and 1 deletions

View File

@@ -1368,7 +1368,7 @@ gb_internal void check_bit_set_type(CheckerContext *c, Type *type, Type *named_t
gb_free(a, s.text);
return;
}
if (!check_representable_as_constant(c, iv, t, nullptr)) {
if (!check_representable_as_constant(c, jv, t, nullptr)) {
gbAllocator a = heap_allocator();
String s = big_int_to_string(a, &j);
gbString ts = type_to_string(t);