blob: 784ddfd9f5a25c515f41e000f2115ba4906c0c64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
const expect = @import("std").testing.expect;
test "comptime pointers" {
comptime {
var x: i32 = 1;
const ptr = &x;
ptr.* += 1;
x += 1;
try expect(ptr.* == 3);
}
}
// test
|