Checks that pointer is not null.
x := 1;
expect_not_null(*x);- pointer: the pointer that must not be null.
- loc: where the check is written, shown when it fails. Leave the default.
expect_not_null :: (pointer: *$T, loc := #caller_location) -> bool
Checks that pointer is not null.
Parameters
- pointer: *$T
- the pointer that must not be null.
- loc := #caller_location
- where the check is written, shown when it fails. Leave the default.
Returns
- bool
x := 1;
expect_not_null(*x);