RFR (javac) 8029558: VerifyError: Bad return type when lambda's body is in parentheses

Robert Field robert.field at oracle.com
Sat Dec 7 12:04:31 PST 2013


On 12/06/13 13:46, Jonathan Gibbons wrote:
> Robert,
>
> Is this for jdk8/tl?   If so, then compiler-dev would be a better forum.

I have sent it to compiler-dev as wqll.

>
> The two tests look very similar. Are they materially different?

They are similar, however one is a lambda call within a lambda 
definition whereas the other is a generic constructor call.  And they 
are, respectively, the original submitted test and the minimal test 
case.  Especially with these squeaky little corner cases, I am more 
comfortable with both.  They are small and non-repetitive, so test 
overhead should be insignificant. After several trials, the test 
duration for one vs both tests is deeply in the noise.

Can I get a thumbs up from someone?

-Robert

>
> -- Jon
>
> On 12/06/2013 01:45 PM, Robert Field wrote:
>> Please review compiler (javac) fix for:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8029558
>>
>> Webrev:
>>
>> http://cr.openjdk.java.net/~rfield/8029558v0/ 
>> <http://cr.openjdk.java.net/%7Erfield/8029558v0/>
>>
>> Fix is to correctly treat the lambda body as a value returning entity 
>> rather than a void entity so that that the correct type converting 
>> casts are generated.  This is done by passing the erased type rather 
>> than null as the expected type.
>>
>> Thanks,
>> Robert
>>
>



More information about the lambda-dev mailing list