Community
Participate
Working Groups
The following code does not compile due to two FALSE errors: "The method f(boolean, Object[]) is ambiguous for the type BugTest" Works with the original Sun javac command line compiler, inside NetBeans and IDEA but not with Eclipse (pre 3.1 and released 3.1). public class BugTest { void f(boolean b, Object... o) { System.err.println("f(boolean, Object...) called"); } void f(Object... o) { System.err.println("f(Object...) called"); } public static void main(String[] args) { BugTest a = new BugTest(); a.f(true); a.f(true, "foobar"); a.f("foo", "bar"); } }
NetBeans and IDEA both uses javac compiler; so these are all the same comparison point. Need to investigate a fix for 3.1.1
Added VarargsTest#test033. Looks like an issue during tiebreak. f(boolean,Object...) should be preferred over f(Object...) for invocations with leading boolean argument.
fixed & released in 3.1.1 stream
released in 3.2 HEAD stream
Verified for 3.2 M2 with build I20050920-0010.
Verified for 3.1.1 using M20050923-1430.Verified for 3.1.1 using M20050923-1430.