| Summary: | [xtend][scoping] Error with implicit 'it' in extension syntax | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Jan Koehnlein <jan> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sven.efftinge |
| Version: | 2.2.1 | Flags: | jan:
juno+
|
| Target Milestone: | M5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
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 following code reports an error: class Foo { def foo(Number x) {} def foo(Object x) {} def bar(Object it) { foo() // Incompatible implicit argument: // Expected Number but got Object } } The error goes away if you make the receiver explicit, i.e. call it.foo() instead or if you switch the order of the foo() methods.