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

Bug 365176

Summary: [xtend] missing error on ambiguous method calls
Product: [Tools] Xtend Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: CoreAssignee: Project Inbox <xtend-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: btickets, sven.efftinge
Version: 2.2.0   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Moritz Eysholdt CLA 2011-11-30 05:40:19 EST
Example:
-----
class foo  {
	def foo(CharSequence x) {}
	def foo(Comparable<?> x) {}
	def bar() { foo("foo") }
}
-----

this compiles to

------
public class foo {
  public Object foo(final CharSequence x) {
    return null;
  }
  
  public Object foo(final Comparable<?> x) {
    return null;
  }
  
  public Object bar() {
    Object _foo = this.foo("foo");
    return _foo;
  }
}
-------


The Java code does not compile because of the error: "The method foo(CharSequence) is ambiguous for the type foo"

I'd expect to see the same error in Xtend.
Comment 1 Sven Efftinge CLA 2013-02-18 07:58:56 EST

*** This bug has been marked as a duplicate of bug 393402 ***