zig/test/behavior/bugs/2006.zig
2022-12-06 19:06:48 -07:00

14 lines
290 B
Zig

const std = @import("std");
const expect = std.testing.expect;
const builtin = @import("builtin");
const S = struct {
p: *S,
};
test "bug 2006" {
var a: S = undefined;
a = S{ .p = undefined };
try expect(@sizeOf(S) != 0);
try expect(@sizeOf(*void) == @sizeOf(*i32));
}