Status for "most specific" varargs method?

Ali Ebrahimi ali.ebrahimi1781 at gmail.com
Tue Feb 11 08:40:41 PST 2014


Any way, this should be consistent with non-varargs counterpart:

int f(Object a) { ... }
int f(int a) { ... }

and call site: f(1)




On Tue, Feb 11, 2014 at 7:48 PM, Stephan Herrmann <
stephan.herrmann at berlin.de> wrote:

> Hi,
>
> Looking at remaining differences in behavior between javac and ecj,
> I came across this bug from 2009:
>
>   https://bugs.openjdk.java.net/browse/JDK-6886431
>
> This made me wonder about the status of this bug.
>
> * Is JLS8 supposed to change the picture?
>   - (I don't see it would)
>
> * Are there plans to fix this in javac?
>   - (javac8 again shows the bug, after javac7 did not)
>
> We'd love to be consistent with JLS *and* javac :)
>
> thanks,
> Stephan
>
> PS: I made experiments as to what spec changes would allow us
> to accept the example. I figured extending the 3 phases of
> overload resolution into 4 might be the cleanest way:
>   1. applicable by strict invocation
>   2. applicable by loose invocation
>   3. applicable by variable-arity strict invocation
>   4. applicable by variable-arity loose invocation
> IFF the current javac behavior is desired, then this would be
> my proposal for JLS9 :)
>


More information about the lambda-spec-observers mailing list