Files
c3c/test/test_suite/expressions/optional_and_error.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

13 lines
193 B
Plaintext

module testing;
import std::io;
fn void main()
{
bool ok;
if (ok && !foo()) io::printfn("nok"); // #error: The expression may not be an optional
}
fn bool? foo()
{
return false;
}