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.
37 lines
318 B
Plaintext
37 lines
318 B
Plaintext
module test;
|
|
import std::io;
|
|
import std::collections::map;
|
|
import std::os;
|
|
|
|
fn void? test2()
|
|
{
|
|
builtin::print_backtrace("hello", 1);
|
|
}
|
|
|
|
fn void test1()
|
|
{
|
|
(void)test2();
|
|
}
|
|
|
|
|
|
fn void foo()
|
|
{
|
|
baz();
|
|
}
|
|
|
|
macro bar()
|
|
{
|
|
builtin::print_backtrace("bar", 1);
|
|
}
|
|
|
|
macro baz()
|
|
{
|
|
bar();
|
|
}
|
|
|
|
|
|
fn void main()
|
|
{
|
|
test1();
|
|
foo();
|
|
} |