aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2020-12-14 17:39:35 +0100
committerLemonBoy <thatlemon@gmail.com>2020-12-14 17:39:35 +0100
commitbbfa3550a02e82df91f5e2fafeab564906ae943c (patch)
treeb73df7a6524fcbd7164eafbfce20287efa6147a7 /test
parent561565fa81e4107f50b8cbdcc00ec0fa2ee4de15 (diff)
downloadzig-bbfa3550a02e82df91f5e2fafeab564906ae943c.tar.gz
zig-bbfa3550a02e82df91f5e2fafeab564906ae943c.zip
Add a test case
Co-authored-with: Vexu <git@vexu.eu>
Diffstat (limited to 'test')
-rw-r--r--test/stage1/behavior/misc.zig7
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(.{})));
+}