Files
c3c/test/test_suite/globals/global_init.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

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'