| Summary: | [xbase] Allow instantiating inner classes | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Knut Wannheden <knut.wannheden> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | btickets, christian.dietrich.opensource, dennis.huebner, jeremie.bresson, nowind_lee, sebastian.zarnekow, sven.efftinge |
| Version: | 2.5.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
| Bug Depends on: | 427279 | ||
| Bug Blocks: | |||
*** 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()
|
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.