mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
18 lines
342 B
Plaintext
18 lines
342 B
Plaintext
|
|
const int CONSTANT = 1;
|
|
int[CONSTANT] a2;
|
|
int[3] a3 = { [CONSTANT] = 1 };
|
|
const bool B = true;
|
|
int[B] c2; // #error: be implicitly converted
|
|
|
|
int non_constant = 10;
|
|
int[non_constant] b; // #error: Expected a constant value as
|
|
|
|
fn int foo()
|
|
{
|
|
return 10;
|
|
}
|
|
|
|
int[foo()] c; // #error: Expected a constant value as
|
|
|