RFR: JDK-8203338: Unboxing in return from lambda miscompiled to throw ClassCastException
B. Blaser
bsrbnd at gmail.com
Tue Jun 19 18:31:47 UTC 2018
On 18 June 2018 at 23:09, B. Blaser <bsrbnd at gmail.com> wrote:
> On 18 June 2018 at 22:12, Maurizio Cimadamore
> <maurizio.cimadamore at oracle.com> wrote:
>> I think that we should use the (erased) return type of the functional
>> descriptor as the target of the translation. In both the
>> expression/statement case.
>>
>> For statement, why not assigning currentMethod to the full method descriptor
>> type? Or, if we really use currentMethod just for visitReturn, maybe just
>> storing the expected return (as Vicente suggests) is ok?
>>
>> Maurizio
>
> I think this should probably work too but it might have more
> side-effects than the fix I suggested.
> I'll take a look and provide another patch with this variant if all goes well...
>
> Bernard
I've attached the variant you both suggested.
Any comment is welcome (langtools:tier1 is OK)!
Bernard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jdk8203338b.patch
Type: text/x-patch
Size: 4395 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180619/ec2ed69c/jdk8203338b.patch>
More information about the compiler-dev
mailing list