mirror of
https://github.com/ziglang/zig.git
synced 2025-12-14 02:03:08 +00:00
14 lines
207 B
Zig
14 lines
207 B
Zig
const expect = @import("std").testing.expect;
|
|
|
|
const A = struct {
|
|
a: u32,
|
|
};
|
|
|
|
fn foo(comptime a: anytype) !void {
|
|
try expect(a[0][0] == @sizeOf(A));
|
|
}
|
|
|
|
test {
|
|
try foo(.{[_]usize{@sizeOf(A)}});
|
|
}
|