Community
Participate
Working Groups
Here's an example that compiles with javac, but fails with the Eclipse compiler: ---8<--- package a; public class A { public void a(int a, int b) { } public void a(Object a, Object b) { } public void b() { Integer i = 1; a(i, 2); } } ---8<--- The error reported by Eclipse is: The method a(int, int) is ambiguous for the type A
Added Autoboxing test073
Just tried with the latest javac 1.5.0_01 drop & our original behaviour was correct. The message send should be ambiguous since the exact match after autoboxing does not take precedence over other compatible matches. Reverted back to our original behaviour.
Verified in I20050214-0927