mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
27 lines
503 B
Plaintext
27 lines
503 B
Plaintext
module test2;
|
|
import test3;
|
|
struct Bar @if($defined(Foo.b)) // #error: "There might be a method 'b' for 'Foo', but methods for the type have not yet been completely registered, so this yields an error.
|
|
{
|
|
int a;
|
|
}
|
|
|
|
struct Bar2 @if($defined((Foo){}.b)) // #error: There might be a method 'b' for 'Foo', but methods have not yet been completely registered, so analysis fails.
|
|
{
|
|
int a;
|
|
}
|
|
|
|
module test3;
|
|
struct Foo
|
|
{
|
|
int a;
|
|
}
|
|
module test;
|
|
|
|
import test2;
|
|
import test3;
|
|
|
|
fn int main()
|
|
{
|
|
Bar b;
|
|
return 0;
|
|
} |