Allow empty argument list methods.
- Compile them as calls and definitions. - Use them for call(), clear(), run(), try(), and yield(). - Update the docs.
This commit is contained in:
@@ -4,4 +4,4 @@ class Foo {
|
||||
}
|
||||
|
||||
var closure = (new Foo).getClosure
|
||||
IO.print(closure.call) // expect: Foo
|
||||
IO.print(closure.call()) // expect: Foo
|
||||
|
||||
@@ -13,7 +13,7 @@ class Outer {
|
||||
}
|
||||
|
||||
(new Inner).method
|
||||
}.call
|
||||
}.call()
|
||||
}
|
||||
|
||||
toString { "Outer" }
|
||||
|
||||
@@ -4,4 +4,4 @@ class Foo {
|
||||
}
|
||||
|
||||
var closure = (new Foo).getClosure
|
||||
IO.print(closure.call.call.call) // expect: Foo
|
||||
IO.print(closure.call().call().call()) // expect: Foo
|
||||
|
||||
Reference in New Issue
Block a user