{| |} expression blocks deprecated.

This commit is contained in:
Christoffer Lerno
2025-02-18 12:50:34 +01:00
parent 26362d5068
commit 168c11e006
26 changed files with 114 additions and 67 deletions

View File

@@ -3,19 +3,19 @@ module catch_err @test;
fn void test()
{
anyfault a;
int! z = {|
int! z = fn int!(anyfault* a) {
const ABC = 4;
int! x = SearchResult.MISSING?;
defer (catch err) a = err;
defer (catch err) *a = err;
return x;
|};
}(&a);
assert(a == SearchResult.MISSING);
anyfault y;
z = {|
z = fn int!(anyfault* y) {
const ABC = 4;
int! x = 1;
defer (catch err) y = err;
defer (catch err) *y = err;
return x;
|};
}(&y);
assert(!y);
}