Files
c3c/test/test_suite/arrays/global_array_non_const.c3
2025-02-04 22:26:51 +01:00

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