| author | |
| committer | |
| log | 680d79ebf9591be74790999088c882de50a2863b |
| tree | e3dd79a36d82183cee4c6cb69c6f9cd32fdd8517 |
| parent | ffdce5f98c7f3d7e18db933e1fb54f987efd5fbf |
1 files changed, 6 insertions(+), 0 deletions(-)
test/behavior/type_info.zig+6| ... | ... | @@ -603,3 +603,9 @@ test "@typeInfo decls ignore dependency loops" { |
| 603 | 603 | }; |
| 604 | 604 | _ = S.foo; |
| 605 | 605 | } |
| 606 | ||
| 607 | test "type info of tuple of string literal default value" { | |
| 608 | const struct_field = @typeInfo(@TypeOf(.{"hi"})).Struct.fields[0]; | |
| 609 | const value = @ptrCast(*align(1) const *const [2:0]u8, struct_field.default_value.?).*; | |
| 610 | comptime std.debug.assert(value[0] == 'h'); | |
| 611 | } |