mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Remove `[?]` syntax. - Change `int!` to `int?` syntax. - New `fault` declarations. - Enum associated values can reference the calling enum.
20 lines
344 B
Plaintext
20 lines
344 B
Plaintext
// #target: macos-x64
|
|
module test;
|
|
import std::io;
|
|
|
|
fn void main()
|
|
{
|
|
var $s1 = $stringify(1 + 2);
|
|
char[*] s2 = $stringify($s1);
|
|
char[] s3 = $s1;
|
|
|
|
io::printfn("$s1 == %s", $s1);
|
|
io::printfn("s2 == %s", &s2);
|
|
io::printfn("s3 == %s", s3);
|
|
}
|
|
|
|
/* #expect: test.ll
|
|
|
|
c"$s1\00", align 1
|
|
c"1 + 2\00", align 1
|
|
c"1 + 2\00", align 1 |