Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367763 - [xtend][scoping] Error with implicit 'it' in extension syntax
Summary: [xtend][scoping] Error with implicit 'it' in extension syntax
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.2.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: M5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-03 09:27 EST by Jan Koehnlein CLA
Modified: 2017-09-19 18:16 EDT (History)
1 user (show)

See Also:
jan: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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