mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 08:14:48 +00:00
preserve 'undefined' in @bitCast
This commit is contained in:
parent
ee8da40769
commit
6b9f7e26c9
@ -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());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user