Open anatoliykmetyuk opened 10 years ago
By the way, construct like:
anchor launch [doSomething]
also doesn't work. To make it work, we need to do it as follows:
anchor launch ([doSomething])
Unhappy with the parsing of println(x)
I think this should behave as comparable normal Scala code does.
If you had instead of [doSomething] a "normal" Scala object, would it be compiled the same?
I understand that in
anchor launch [doSomething]
the open bracket is seen as the start of a type parameter list. We cannot improve this behaviour I am afraid.
Consider following program:
In AST view, it will translate to:
Apparently, ".println(x)" at the end is not what we want.
There are 2 workarounds, both clumsy though:
(note that both semicolon and extra line break are required, or it will not work)
Or: