diff options
| author | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2022-03-08 11:53:43 -0800 |
|---|---|---|
| committer | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2022-03-08 12:04:51 -0800 |
| commit | cd32b11eb8d33225a1a2bc3bc9e0755936a39ade (patch) | |
| tree | 9a1d9ccc5011f4cbc8efa9b5d76df597c7b803ca /src/Module.zig | |
| parent | 55ccf4c7a8451edca47d8d6d82bddd9fe192744a (diff) | |
| download | zig-cd32b11eb8d33225a1a2bc3bc9e0755936a39ade.tar.gz zig-cd32b11eb8d33225a1a2bc3bc9e0755936a39ade.zip | |
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);
}
}
```
Diffstat (limited to 'src/Module.zig')
0 files changed, 0 insertions, 0 deletions
