| ... | ... | @@ -0,0 +1,61 @@ |
| 1 | #update=initial version, T is struct |
| 2 | #file=main.zig |
| 3 | const T = @import("foo.zig").T; |
| 4 | pub fn main() void { |
| 5 | @compileLog(T); |
| 6 | @compileLog(@tagName(@typeInfo(T))); |
| 7 | } |
| 8 | #file=foo.zig |
| 9 | pub const T = struct { x: u8 }; |
| 10 | #expect_error=main.zig:3:5: error: found compile log statement |
| 11 | #expect_compile_log=@as(type, foo.T) |
| 12 | #expect_compile_log=@as(*const [6:0]u8, "struct") |
| 13 | |
| 14 | #update=T is union |
| 15 | #file=foo.zig |
| 16 | pub const T = union {}; |
| 17 | #expect_error=main.zig:3:5: error: found compile log statement |
| 18 | #expect_compile_log=@as(type, foo.T) |
| 19 | #expect_compile_log=@as(*const [5:0]u8, "union") |
| 20 | |
| 21 | #update=T is enum |
| 22 | #file=foo.zig |
| 23 | pub const T = enum {}; |
| 24 | #expect_error=main.zig:3:5: error: found compile log statement |
| 25 | #expect_compile_log=@as(type, foo.T) |
| 26 | #expect_compile_log=@as(*const [4:0]u8, "enum") |
| 27 | |
| 28 | #update=T is opaque |
| 29 | #file=foo.zig |
| 30 | pub const T = opaque {}; |
| 31 | #expect_error=main.zig:3:5: error: found compile log statement |
| 32 | #expect_compile_log=@as(type, foo.T) |
| 33 | #expect_compile_log=@as(*const [6:0]u8, "opaque") |
| 34 | |
| 35 | #update=T is packed struct |
| 36 | #file=foo.zig |
| 37 | pub const T = packed struct {}; |
| 38 | #expect_error=main.zig:3:5: error: found compile log statement |
| 39 | #expect_compile_log=@as(type, foo.T) |
| 40 | #expect_compile_log=@as(*const [6:0]u8, "struct") |
| 41 | |
| 42 | #update=T is packed union |
| 43 | #file=foo.zig |
| 44 | pub const T = packed union { x: void }; // packed unions need at least 1 field |
| 45 | #expect_error=main.zig:3:5: error: found compile log statement |
| 46 | #expect_compile_log=@as(type, foo.T) |
| 47 | #expect_compile_log=@as(*const [5:0]u8, "union") |
| 48 | |
| 49 | #update=T is extern struct |
| 50 | #file=foo.zig |
| 51 | pub const T = extern struct {}; |
| 52 | #expect_error=main.zig:3:5: error: found compile log statement |
| 53 | #expect_compile_log=@as(type, foo.T) |
| 54 | #expect_compile_log=@as(*const [6:0]u8, "struct") |
| 55 | |
| 56 | #update=T is extern union |
| 57 | #file=foo.zig |
| 58 | pub const T = extern union { x: void }; // extern unions need at least 1 field |
| 59 | #expect_error=main.zig:3:5: error: found compile log statement |
| 60 | #expect_compile_log=@as(type, foo.T) |
| 61 | #expect_compile_log=@as(*const [5:0]u8, "union") |