Fix transmute corrupting a compile time constant

This commit is contained in:
gingerBill
2026-06-05 14:13:08 +01:00
parent 8d1d126e16
commit f14071bd14

View File

@@ -3948,7 +3948,7 @@ gb_internal bool check_transmute(CheckerContext *c, Ast *node, Operand *o, Type
if (types_have_same_internal_endian(src_t, dst_t)) {
ExactValue src_v = exact_value_to_integer(o->value);
GB_ASSERT(src_v.kind == ExactValue_Integer || src_v.kind == ExactValue_Invalid);
BigInt v = src_v.value_integer;
BigInt v = big_int_make(&src_v.value_integer);
BigInt smax = {};
BigInt umax = {};