| ... | @@ -603,3 +603,9 @@ test "@typeInfo decls ignore dependency loops" { | ... | @@ -603,3 +603,9 @@ test "@typeInfo decls ignore dependency loops" { |
| 603 | }; | 603 | }; |
| 604 | _ = S.foo; | 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 | } |