- Create optional with ~ instead of ?. return io::EOF?; becomes return io::EOF~.

- Deprecated use of `?` to create optional.
This commit is contained in:
Christoffer Lerno
2026-01-20 16:10:28 +01:00
parent 5390ca6250
commit cdabe8fd9e
159 changed files with 710 additions and 707 deletions

View File

@@ -34,11 +34,11 @@ faultdef SOME_FAULT, ABC_FAULT;
fn void test_try_catch()
{
int val;
int? x = ABC_FAULT?;
int? x = ABC_FAULT~;
assert(@try_catch(val, x, ABC_FAULT)!!);
assert(val == 0);
assert(!@catch(@try_catch(val, x, ABC_FAULT)));
x = SOME_FAULT?;
x = SOME_FAULT~;
assert(@catch(@try_catch(val, x, ABC_FAULT)) == SOME_FAULT);
x = 3;
assert(!@try_catch(val, x, ABC_FAULT)!!);