Fwd: [jvm-l] Newly introduced OpenJDK javac bug?

Rémi Forax forax at univ-mlv.fr
Thu Jun 9 08:26:02 PDT 2011

On 06/09/2011 04:52 PM, Robert Fischer wrote:
> I've been using precisely the pattern that Charlie lays out in some of 
> my code, as well, so I'm going to have to code around it now. I didn't 
> realize that it was technically ambiguous — it's really surprising to 
> my intuition, which (I'm now realizing as I think about it) tries to 
> match arguments left to right, and only drops to varargs if it can't 
> find a match. That intuition is obviously wrong compared to the spec, 
> but does that mean we have a bug in the spec? What's the justification 
> for this behavior?
> For the record, both Scala and Groovy resolve methods more in line 
> with intuition:
> Groovy > https://gist.github.com/1016878
> Scala > https://gist.github.com/1016880

Yes, because either in Scala or in Groovy int is a subtype of Object.
There is no point to make a difference between int and Integer in a 
dynamic language.

> ~~ Robert.


More information about the compiler-dev mailing list