Community
Participate
Working Groups
Unqualified invocation of a parametrised method fails unless it is the first line in a function body. This code won't compile: .. any statement .. <Foo>bar() // two type mismatch errors occur. it.<Foo>bar() // compiles of course. ;<Foo>bar() // also compiles, unless first statement in body. Won't compile: { ;<Foo>bar() } { ; }
There are two things happening here: 1) Unlike Java Xtend doesn'T upport the empty statement (i.e. just a semicolon). 2) There is an ambiguity for an expression like { foo <X>bar } as it is actually parsed as: { foo<X> bar } Maybe we can support the empty expression. For the second we could add a warning taking the whitespace into account.