| 1 | #exe { |
| 2 | -Mroot=main.zig |
| 3 | #} |
| 4 | |
| 5 | #write main.zig { |
| 6 | const foo = {}; |
| 7 | pub fn main() void { |
| 8 | _ = &foo; |
| 9 | } |
| 10 | #} |
| 11 | #update |
| 12 | #check stdout |
| 13 | |
| 14 | #write main.zig { |
| 15 | const foo = something; |
| 16 | pub fn main() void { |
| 17 | _ = &foo; |
| 18 | } |
| 19 | #} |
| 20 | #update "introduce use of undeclared identifier" |
| 21 | #check errors { |
| 22 | main.zig:1:13: error: use of undeclared identifier 'something' |
| 23 | #} |
| 24 | |
| 25 | #write main.zig { |
| 26 | const foo = {}; |
| 27 | pub fn main() void { |
| 28 | _ = &foo; |
| 29 | } |
| 30 | #} |
| 31 | #update "revert use of undeclared identifier" |
| 32 | #check stdout |