Commit bbfa3550a0

LemonBoy <thatlemon@gmail.com>
2020-12-14 17:39:35
Add a test case
Co-authored-with: Vexu <git@vexu.eu>
1 parent 561565f
Changed files (1)
test
stage1
behavior
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(.{})));
+}