zig/doc/langref/test_comptime_unwrap_null.zig

8 lines
144 B
Zig

comptime {
const optional_number: ?i32 = null;
const number = optional_number.?;
_ = number;
}
// test_error=unable to unwrap null