Community
Participate
Working Groups
Given the following Java classes: public class Foo { public class Bar { } } In Xtend2 I should be able to write "new Foo().new Bar()". But that gives me a parse error on the second "new". The editor does however accept "new Foo$Bar()". But that's of course wrong and the generated code doesn't compile. Setting this one to minor as I think this is fairly unusual coding style.
*** Bug 377463 has been marked as a duplicate of this bug. ***
Had the same issue today. If the outer type is not final, following strategy could be a workaround: val bar = new Foo(){def createBar() {new Bar}}.createBar()