Community
Participate
Working Groups
The two attached classes MethodsAB and MethodsBA are identical except for the ordering of the two overloadings of 'method'. Compiling and running these in Eclipse gives different results for each. MethodsAB outputs "Method A" whereas MethodsBA outputs "Method B". Sun's javac 1.5.0_04 generates code that outputs "Method B" for both. I couldn't say for certain which method should be called (which is "most specific" in the sense of JLS3 15.12.2.5?), but the result should at least be the same in each case.
Created attachment 25708 [details] Source for MethodsAB and MethodsBA Source attached.
Will be fixed when we take care of tieBreak methods as described in bug 100869
Fix will not be ready for 3.1.1, removing target milestone "3.1.1"
Kent - using HEAD we complain about ambiguities in both cases.
Finally fixed. Added AmbiguousMethodTest test011
Verified for 3.2 M6 using build I20060329-0010.