RFR: JDK-8203338: Unboxing in return from lambda miscompiled to throw ClassCastException

B. Blaser bsrbnd at gmail.com
Mon Jun 18 21:09:09 UTC 2018


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


More information about the compiler-dev mailing list