mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
15 lines
565 B
Plaintext
15 lines
565 B
Plaintext
func void syntaxErrors()
|
|
{
|
|
int! i = 0;
|
|
while (i + 1) {} // #error: 'int!' cannot be converted into 'bool'
|
|
if (i + 1) {} // #error: 'int!' cannot be converted into 'bool'
|
|
for (int x = i;;) {} // #error: 'int!' cannot be implicitly cast to 'int'.
|
|
for (int x = 0; x < i + 1;) {} // #error: 'bool!' cannot be implicitly cast to 'bool'
|
|
for (int x = 0; x < 10; x += i + 1) {} // #error: 'int!' cannot be implicitly cast to 'int'
|
|
switch (i + 1) // #error: 'int!' cannot be converted into 'int'
|
|
{
|
|
default:
|
|
i + 1;
|
|
}
|
|
}
|