1 2 3 4 5 6 7
const expect = @import("std").testing.expect; test "allowzero" { var zero: usize = 0; var ptr = @intToPtr(*allowzero i32, zero); expect(@ptrToInt(ptr) == 0); }