| Summary: | [Xtend] allow invoking static methods in explicit constructor calls | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Moritz Eysholdt <moritz.eysholdt> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | sebastian.zarnekow |
| Version: | unspecified | Flags: | sebastian.zarnekow:
juno+
|
| Target Milestone: | M4 | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
See testcase with wrong expectation: Xtend2ValidationTest.testConstructorArgumentIsValid_04() Pushed to master. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
The example ---- class bar { def static foo(int i) { i + 1 } new(int i) { } new() { this(foo(1)) } } --- raises error "Cannot refer to a method while explicitly invoking a constructor" under "foo(1)". Expected behavior: no error message, since this can directly be mapped to Java. The same should apply for "super()": --- class foo extends bar { new() { super(bar::foo( 42)) } } ---