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.
22 lines
621 B
Plaintext
22 lines
621 B
Plaintext
// TODO string str = "hello";
|
|
char* str2 = "hello";
|
|
String str3 = "hello";
|
|
|
|
|
|
int[2] a1 = { 1, 2 };
|
|
|
|
int[2] a2 = 30; // #error: 'int' to 'int[2]'
|
|
|
|
ichar[*] a; // #error: Inferred array types can only be used in declarations with initializers
|
|
|
|
ichar ca = 0;
|
|
ichar cb = 1;
|
|
|
|
ichar cc = 127;
|
|
ichar cd = -128;
|
|
|
|
ichar ce = 128; // #error: The value '128' is out of range for 'ichar'
|
|
ichar cf = -129; // #error: The value '-129' is out of range for 'ichar'
|
|
|
|
ichar cg = 70000; // #error: The value '70000' is out of range for 'ichar'
|
|
ichar ch = -70000; // #error: The value '-70000' is out of range for 'ichar' |