mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
21 lines
428 B
Plaintext
21 lines
428 B
Plaintext
int x = 3;
|
|
|
|
fn void test()
|
|
{
|
|
$assert x == 3; // #error: Compile time evaluation requires a compile time constant value.
|
|
}
|
|
|
|
fn void test2()
|
|
{
|
|
int i = 0;
|
|
$assert 1;
|
|
$assert i == 0; // #error: Compile time evaluation requires a compile time constant value.
|
|
}
|
|
|
|
extern fn int foo();
|
|
fn void test3()
|
|
{
|
|
int i = 0;
|
|
$assert foo() == 0; // #error: Compile time evaluation requires a compile time constant value.
|
|
}
|