mirror of
https://github.com/ziglang/zig.git
synced 2026-11-22 04:37:39 -05:00
1 parent
561565fa81
commit
bbfa3550a0
1 file changed
+7
@@ -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(.{})));
|
||||
}
|
||||
Reference in new issue
Block a user