authorgravatar for wrongnull@gmail.comBogdan Romanyuk <wrongnull@gmail.com> 2023-11-09 15:01:59+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-11-09 19:40:20+02:00
log6b9f7e26c9e43700225b7c2479305015df75a2b9
treeff69d81177c387b6fd5f63022103d2fc73be2465
parentee8da4076968101ae765a6f223f94dcec431db08

preserve 'undefined' in @bitCast


1 files changed, 2 insertions(+), 0 deletions(-)

src/Sema.zig+2
...@@ -30719,6 +30719,8 @@ fn bitCast(...@@ -30719,6 +30719,8 @@ fn bitCast(
30719 }30719 }
3072030720
30721 if (try sema.resolveValue(inst)) |val| {30721 if (try sema.resolveValue(inst)) |val| {
30722 if (val.isUndef(mod))
30723 return mod.undefRef(dest_ty);
30722 if (try sema.bitCastVal(block, inst_src, val, old_ty, dest_ty, 0)) |result_val| {30724 if (try sema.bitCastVal(block, inst_src, val, old_ty, dest_ty, 0)) |result_val| {
30723 return Air.internedToRef(result_val.toIntern());30725 return Air.internedToRef(result_val.toIntern());
30724 }30726 }