| 1 | export fn foo() void { |
| 2 | comptime var a: u8 = 0; |
| 3 | _ = [0:&a]*u8; |
| 4 | } |
| 5 | |
| 6 | export fn baz() void { |
| 7 | comptime var a: u8 = 0; |
| 8 | _ = [:&a]*u8; |
| 9 | } |
| 10 | export fn qux() void { |
| 11 | comptime var a: u8 = 0; |
| 12 | _ = @Pointer(.many, .{}, *u8, &a); |
| 13 | } |
| 14 | |
| 15 | // error |
| 16 | // |
| 17 | // :3:12: error: sentinel contains reference to comptime var |
| 18 | // :2:14: note: 'sentinel' points to comptime var declared here |
| 19 | // :8:11: error: sentinel contains reference to comptime var |
| 20 | // :7:14: note: 'sentinel' points to comptime var declared here |
| 21 | // :12:35: error: sentinel contains reference to comptime var |
| 22 | // :11:14: note: 'sentinel' points to comptime var declared here |