NPE in isSignaturePolymorphic(jdk.compiler at 9-internal/Types.java:1079)
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Wed Oct 26 10:35:01 UTC 2016
On 25/10/16 23:31, Alex Buckley wrote:
> Sure, but the definition of a signature polymorphic method is that it
> has exactly one formal parameter. There seems to be an undercurrent
> that methods can have no formal parameters and still be signature
> polymorphic, which is wrong.
My reading of this situation: the spec mandates that a poly sig method
must have a varargs argument Object... - that will stay the same.
On the other hand, javac will crash whenever it finds a native method in
MethodHandle.java that has no arguments. That must be fixed. But, after
the fix, the 0-ary method will NOT be considered as a poly signature
method by javac.
Maurizio
>
> Alex
>
> On 10/25/2016 3:28 PM, Remi Forax wrote:
>> You can imagine a polymorphic signature that returns the current time as
>> an int or a long depending on the call site.
>>
>> Rémi
>>
>> On October 26, 2016 12:11:35 AM GMT+02:00, Alex Buckley
>> <alex.buckley at oracle.com> wrote:
>>
>> On 10/25/2016 3:01 PM, Remi Forax wrote:
>>
>> a method with no parameter type still have a return type that
>> can be
>> back propagated if it's a polymorphic signature.
>>
>>
>> I don't know what you mean.
>>
>> Alex
>>
>>
>> --
>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
More information about the compiler-dev
mailing list