Files
c3c/test/test_suite/compile_time/extern_is_not_const.c3

17 lines
328 B
Plaintext

module test;
import std;
extern const void* FOO @cname("malloc");
macro foo($x) {}
fn void test()
{
var $x = FOO; // #error: $x must be assigned a compile-time constant. 'extern' constants are resolved
}
fn void test2()
{
foo(FOO); // #error: $x must be assigned a compile-time constant. 'extern' constants are resolved
}