mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
18 lines
313 B
C
18 lines
313 B
C
|
|
const int CONSTANT = 1;
|
|
int[CONSTANT] a2;
|
|
|
|
const bool B = true;
|
|
int[B] c2; // #error: Expected an integer size.
|
|
|
|
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
|
|
|