Invokes detectable illegal behavior when ok is false.
In debug and safe modes, calls to this function are always
generated, and the unreachable statement triggers a panic.
In fast and small modes, calls to this function are optimized away, and in fact the optimizer is able to use the assertion in its heuristics.
Inside a test block, it is best to use the testing module rather than
this function, because this function may not detect a test failure in
fast and small mode. Outside of a test block, this assert
function is the correct function to use.
pub fn assert(ok: bool) void
pub fn assert(ok: bool) void {
@disableInstrumentation();
if (!ok) unreachable; // assertion failure
}