| 1 | #exe { |
| 2 | -Mroot=main.zig |
| 3 | #} |
| 4 | |
| 5 | #write main.zig { |
| 6 | const pre = {}; |
| 7 | |
| 8 | thing: @This().does_not_exist, |
| 9 | |
| 10 | const post = {}; |
| 11 | |
| 12 | pub fn main() void { |
| 13 | _ = @as(@This(), undefined); |
| 14 | } |
| 15 | #} |
| 16 | #update |
| 17 | #check errors { |
| 18 | main.zig:3:15: error: root source file struct 'main' has no member named 'does_not_exist' |
| 19 | main.zig:1:1: note: struct declared here |
| 20 | #} |
| 21 | |
| 22 | #write main.zig { |
| 23 | const pre = {}; |
| 24 | const pre_1 = {}; |
| 25 | |
| 26 | thing: @This().does_not_exist, |
| 27 | |
| 28 | const post = {}; |
| 29 | const post_1 = {}; |
| 30 | |
| 31 | pub fn main() void { |
| 32 | _ = @as(@This(), undefined); |
| 33 | } |
| 34 | #} |
| 35 | #update "add more decls around error" |
| 36 | #check errors { |
| 37 | main.zig:4:15: error: root source file struct 'main' has no member named 'does_not_exist' |
| 38 | main.zig:1:1: note: struct declared here |
| 39 | #} |