RFR: 8336492: Regression in lambda serialization [v10]
Vicente Romero
vromero at openjdk.org
Tue Jul 30 12:10:39 UTC 2024
On Tue, 30 Jul 2024 08:24:56 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java line 831:
>>
>>> 829:
>>> 830: private MethodType typeToMethodType(Type mt) {
>>> 831: Type type = types.erasure(mt);
>>
>> nit: not part of your patch but I think that `mt` should already be erased at this point, now that Lower is running before L2M
>
> I don't think so - I see it used here:
>
>
> MethodSymbol samSym = (MethodSymbol) types.findDescriptorSymbol(tree.target.tsym);
> List<LoadableConstant> staticArgs = List.of(
> typeToMethodType(samSym.type),
> refSym.asHandle(),
> typeToMethodType(tree.getDescriptorType(types)));
>
>
> I think neither `samSym.type` nor the result of `tree::getDescriptorType` (which is based on `tree.target`) are erased.
ok sounds good
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20349#discussion_r1696851526
More information about the compiler-dev
mailing list