| author | |
| committer | |
| log | bf972e44d5d0ce704cae99957d565c55ea16335d |
| tree | c709555e4de2eea52d52a6927b0bf0f3c3da6a14 |
| parent | cd43f323d28e66d11273425cc6debcce735c33e2 |
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/Sema.zig+1| ... | @@ -19939,6 +19939,7 @@ fn typePtrOrOptionalPtrTy( | ... | @@ -19939,6 +19939,7 @@ fn typePtrOrOptionalPtrTy( |
| 19939 | .many_mut_pointer, | 19939 | .many_mut_pointer, |
| 19940 | .manyptr_u8, | 19940 | .manyptr_u8, |
| 19941 | .manyptr_const_u8, | 19941 | .manyptr_const_u8, |
| 19942 | .manyptr_const_u8_sentinel_0, | ||
| 19942 | => return ty, | 19943 | => return ty, |
| 19943 | 19944 | ||
| 19944 | .pointer => switch (ty.ptrSize()) { | 19945 | .pointer => switch (ty.ptrSize()) { |