diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-08-22 00:33:57 +0300 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-08-22 11:16:36 +0300 |
| commit | 74c7782c6083d398a4f0f126a4597c605d5223cd (patch) | |
| tree | 425012fe2ac6e628e40fe1caa25929eb84e7b4c5 /src | |
| parent | c1afe57d70606a20af42cb761b4919765295dcd4 (diff) | |
| download | zig-74c7782c6083d398a4f0f126a4597c605d5223cd.tar.gz zig-74c7782c6083d398a4f0f126a4597c605d5223cd.zip | |
Sema: make orelse with C pointers behave like stage1 for now
Closes #12537
Diffstat (limited to 'src')
| -rw-r--r-- | src/Sema.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index 24bbdb0b0c..2355e8374d 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -7261,6 +7261,8 @@ fn zirOptionalPayload( if (operand_ty.ptrSize() != .C) { return sema.failWithExpectedOptionalType(block, src, operand_ty); } + // TODO https://github.com/ziglang/zig/issues/6597 + if (true) break :t operand_ty; const ptr_info = operand_ty.ptrInfo().data; break :t try Type.ptr(sema.arena, sema.mod, .{ .pointee_type = try ptr_info.pointee_type.copy(sema.arena), |
