mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
18 lines
235 B
Zig
18 lines
235 B
Zig
pub fn main() void {
|
|
var x: u32 = undefined;
|
|
const maybe_x = byPtr(&x);
|
|
assert(maybe_x == null);
|
|
}
|
|
|
|
fn byPtr(x: *u32) ?*u32 {
|
|
_ = x;
|
|
return null;
|
|
}
|
|
|
|
fn assert(ok: bool) void {
|
|
if (!ok) unreachable;
|
|
}
|
|
|
|
// run
|
|
//
|