Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365176 - [xtend] missing error on ambiguous method calls
Summary: [xtend] missing error on ambiguous method calls
Status: CLOSED DUPLICATE of bug 393402
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.2.0   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 05:40 EST by Moritz Eysholdt CLA
Modified: 2013-02-18 07:58 EST (History)
2 users (show)

See Also:


Attachments

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