authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-12-14 17:39:35+01:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-12-14 17:39:35+01:00
logbbfa3550a02e82df91f5e2fafeab564906ae943c
treeb73df7a6524fcbd7164eafbfce20287efa6147a7
parent561565fa81e4107f50b8cbdcc00ec0fa2ee4de15

Add a test case

Co-authored-with: Vexu <git@vexu.eu>

1 files changed, 7 insertions(+), 0 deletions(-)

test/stage1/behavior/misc.zig+7
...@@ -752,3 +752,10 @@ test "extern variable with non-pointer opaque type" {...@@ -752,3 +752,10 @@ test "extern variable with non-pointer opaque type" {
752 @export(var_to_export, .{ .name = "opaque_extern_var" });752 @export(var_to_export, .{ .name = "opaque_extern_var" });
753 expect(@ptrCast(*align(1) u32, &opaque_extern_var).* == 42);753 expect(@ptrCast(*align(1) u32, &opaque_extern_var).* == 42);
754}754}
755
756test "lazy typeInfo value as generic parameter" {
757 const S = struct {
758 fn foo(args: anytype) void {}
759 };
760 S.foo(@typeInfo(@TypeOf(.{})));
761}