diff --git a/test/stage1/behavior/type_info.zig b/test/stage1/behavior/type_info.zig index 12a7c118b7..3eb91d534f 100644 --- a/test/stage1/behavior/type_info.zig +++ b/test/stage1/behavior/type_info.zig @@ -299,3 +299,17 @@ test "type info: optional field unwrapping" { _ = field.offset orelse 0; } + +test "type info: pass to function" { + _ = passTypeInfo(@typeInfo(void)); + _ = comptime passTypeInfo(@typeInfo(void)); +} + +fn passTypeInfo(comptime info: TypeInfo) type { + return void; +} + +test "type info: TypeId -> TypeInfo impl cast" { + _ = passTypeInfo(TypeId.Void); + _ = comptime passTypeInfo(TypeId.Void); +}