mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
27 lines
259 B
Plaintext
27 lines
259 B
Plaintext
import std::io;
|
|
|
|
fn Foo foo()
|
|
{
|
|
return (Foo){};
|
|
}
|
|
|
|
fn Bar bar()
|
|
{
|
|
return (Bar){};
|
|
}
|
|
|
|
struct Bar
|
|
{
|
|
$typeof(foo().foo) bar; // #error: Recursive definition of 'bar'
|
|
}
|
|
|
|
struct Foo
|
|
{
|
|
$typeof(bar().bar) foo;
|
|
}
|
|
|
|
fn void main()
|
|
{
|
|
io::printn("Hello, World!");
|
|
}
|