diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/stage1/behavior/misc.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/stage1/behavior/misc.zig b/test/stage1/behavior/misc.zig index 269db18579..850622c5ba 100644 --- a/test/stage1/behavior/misc.zig +++ b/test/stage1/behavior/misc.zig @@ -752,3 +752,10 @@ test "extern variable with non-pointer opaque type" { @export(var_to_export, .{ .name = "opaque_extern_var" }); expect(@ptrCast(*align(1) u32, &opaque_extern_var).* == 42); } + +test "lazy typeInfo value as generic parameter" { + const S = struct { + fn foo(args: anytype) void {} + }; + S.foo(@typeInfo(@TypeOf(.{}))); +} |
