Files
c3c/test/test_suite/defer/defer_with_rethrow.c3
Christoffer Lerno 25bccf4883 New faults and syntax (#2034)
- Remove `[?]` syntax.
- Change `int!` to `int?` syntax.
- New `fault` declarations.
- Enum associated values can reference the calling enum.
2025-03-10 00:11:35 +01:00

12 lines
150 B
Plaintext

fn int? foo()
{ return 1; }
fn int? bar()
{
defer {
foo()!!;
}
defer foo()!; // #error: Rethrows are not allowed inside of defers.
return 1;
}