mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
36 lines
441 B
Plaintext
36 lines
441 B
Plaintext
module foo;
|
|
|
|
fn int test() @builtin
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
macro int testm() @builtin
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
fn int test1()
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
macro int testm1()
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
module bar;
|
|
import foo;
|
|
|
|
fn void main()
|
|
{
|
|
testm();
|
|
test();
|
|
}
|
|
|
|
fn void main2()
|
|
{
|
|
testm1(); // #error: Macros from other modules must be prefixed with the module nam
|
|
test1(); // #error: Functions from other modules must be prefixed with the module nam
|
|
} |