diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-12-14 17:39:35 +0100 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2020-12-14 17:39:35 +0100 |
| commit | bbfa3550a02e82df91f5e2fafeab564906ae943c (patch) | |
| tree | b73df7a6524fcbd7164eafbfce20287efa6147a7 /test/stage1 | |
| parent | 561565fa81e4107f50b8cbdcc00ec0fa2ee4de15 (diff) | |
| download | zig-bbfa3550a02e82df91f5e2fafeab564906ae943c.tar.gz zig-bbfa3550a02e82df91f5e2fafeab564906ae943c.zip | |
Add a test case
Co-authored-with: Vexu <git@vexu.eu>
Diffstat (limited to 'test/stage1')
| -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(.{}))); +} |
