preserve 'undefined' in @bitCast

This commit is contained in:
Bogdan Romanyuk
2023-11-09 15:01:59 +03:00
committed by Veikka Tuominen
parent ee8da40769
commit 6b9f7e26c9

View File

@@ -30719,6 +30719,8 @@ fn bitCast(
}
if (try sema.resolveValue(inst)) |val| {
if (val.isUndef(mod))
return mod.undefRef(dest_ty);
if (try sema.bitCastVal(block, inst_src, val, old_ty, dest_ty, 0)) |result_val| {
return Air.internedToRef(result_val.toIntern());
}