mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
33 lines
340 B
Plaintext
33 lines
340 B
Plaintext
module abc;
|
|
|
|
module abc::baz;
|
|
|
|
struct Abc @private
|
|
{
|
|
int x;
|
|
}
|
|
|
|
fn void test() @private
|
|
{
|
|
|
|
}
|
|
|
|
module test;
|
|
import abc @public;
|
|
|
|
fn int main()
|
|
{
|
|
Abc x;
|
|
abc::baz::test();
|
|
return 0;
|
|
}
|
|
|
|
module test2;
|
|
import abc @norecurse @public;
|
|
|
|
fn int test()
|
|
{
|
|
{ Abc x; } // #error: is '@private'
|
|
abc::baz::test(); // #error: is '@private'
|
|
return 0;
|
|
} |