If a capitalized name cannot be resolved, a new top-level variable with its name is implicitly declared. If a real definition is not found later, a compile time error is raised. Mutual recursion at the top level works now! Fix #101. Fix #106.
11 lines
170 B
Plaintext
11 lines
170 B
Plaintext
class Foo {
|
|
static bar { new Bar }
|
|
}
|
|
|
|
class Bar {
|
|
static foo { new Foo }
|
|
}
|
|
|
|
IO.print(Foo.bar) // expect: instance of Bar
|
|
IO.print(Bar.foo) // expect: instance of Foo
|