Commit cd32b11
committed
stage2: inferred alloc can use bitcast ty
The comment notes that we can't because of constness, but the recent
work by @Vexu lets us use the bitcast ty cause constness comes later.
The following tests pass from this:
```
test "A" {
const ary = [_:0]u8{42};
const ptr: [*:0]const u8 = &ary;
try expect(ptr[1] == 0);
}
test "B" {
comptime {
const ary = [_:0]u8{42};
const ptr: [*:0]const u8 = &ary;
try expect(ptr[1] == 0);
}
}
```1 parent 55ccf4c commit cd32b11
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2623 | 2623 | | |
2624 | 2624 | | |
2625 | 2625 | | |
2626 | | - | |
2627 | | - | |
2628 | | - | |
2629 | | - | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
2630 | 2629 | | |
2631 | 2630 | | |
2632 | 2631 | | |
| |||
0 commit comments