diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/behavior/struct.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/behavior/struct.zig b/test/behavior/struct.zig index 56231a9fea..7eb5e62282 100644 --- a/test/behavior/struct.zig +++ b/test/behavior/struct.zig @@ -1881,3 +1881,12 @@ test "field calls do not force struct field init resolution" { _ = &s; try expect(s.x == 123); } + +test "tuple with comptime-only field" { + const x = getTuple(); + try expect(x.@"0" == 0); +} + +fn getTuple() struct { comptime_int } { + return struct { comptime comptime_int = 0 }{0}; +} |
