mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
parent
e04547642a
commit
3b2c421102
@ -27330,7 +27330,7 @@ fn coerceCompatiblePtrs(
|
||||
return sema.addConstant(dest_ty, val);
|
||||
}
|
||||
try sema.requireRuntimeBlock(block, inst_src, null);
|
||||
const inst_allows_zero = (inst_ty.zigTypeTag() == .Pointer and inst_ty.ptrAllowsZero()) or true;
|
||||
const inst_allows_zero = inst_ty.zigTypeTag() != .Pointer or inst_ty.ptrAllowsZero();
|
||||
if (block.wantSafety() and inst_allows_zero and !dest_ty.ptrAllowsZero() and
|
||||
try sema.typeHasRuntimeBits(dest_ty.elemType2()))
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user