Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367763

Summary: [xtend][scoping] Error with implicit 'it' in extension syntax
Product: [Modeling] TMF Reporter: Jan Koehnlein <jan>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sven.efftinge
Version: 2.2.1Flags: jan: juno+
Target Milestone: M5   
Hardware: All   
OS: All   
Whiteboard:

Description Jan Koehnlein CLA 2012-01-03 09:27:21 EST
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.
Comment 1 Sven Efftinge CLA 2012-01-05 05:22:26 EST
pushed to master
Comment 2 Karsten Thoms CLA 2017-09-19 18:06:40 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 18:16:23 EDT
Closing all bugs that were set to RESOLVED before Neon.0