stage2: coerce [*:0]u8 to other valid pointer types
This makes the following work properly (as it does in stage1, too):
var zero_ptr: [*:0]const u8 = undefined;
var no_zero_ptr: [*]const u8 = zero_ptr;
Prior to this this would fail with an "expected type" error since
coercion failed.
1 files changed, 1 insertions(+), 0 deletions(-)
src
src/Sema.zig+1
| ... | ... | @@ -19939,6 +19939,7 @@ fn typePtrOrOptionalPtrTy( |
| 19939 | 19939 | .many_mut_pointer, |
| 19940 | 19940 | .manyptr_u8, |
| 19941 | 19941 | .manyptr_const_u8, |
| 19942 | .manyptr_const_u8_sentinel_0, |
| 19942 | 19943 | => return ty, |
| 19943 | 19944 | |
| 19944 | 19945 | .pointer => switch (ty.ptrSize()) { |