| 1 | const empty = .{}; |
| 2 | |
| 3 | const Foo = struct {}; |
| 4 | const foo: Foo = empty; |
| 5 | |
| 6 | const Bar = struct { a: u32 }; |
| 7 | const bar: Bar = empty; |
| 8 | |
| 9 | comptime { |
| 10 | _ = foo; |
| 11 | } |
| 12 | comptime { |
| 13 | _ = bar; |
| 14 | } |
| 15 | |
| 16 | // error |
| 17 | // |
| 18 | // :4:18: error: expected type 'tmp.Foo', found '@TypeOf(.{})' |
| 19 | // :3:13: note: struct declared here |
| 20 | // :7:18: error: expected type 'tmp.Bar', found '@TypeOf(.{})' |
| 21 | // :6:13: note: struct declared here |