mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
- Remove `[?]` syntax. - Change `int!` to `int?` syntax. - New `fault` declarations. - Enum associated values can reference the calling enum.
13 lines
193 B
Plaintext
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;
|
|
} |