[lworld] RFR: 8273018: [lworld] Property annotation propagation to <init> lacks in primitive records [v2]
Jesper Steen Møller
jespersm at openjdk.java.net
Tue Sep 7 23:45:18 UTC 2021
On Tue, 7 Sep 2021 23:37:52 GMT, Jesper Steen Møller <jespersm at openjdk.org> wrote:
>> This fix copies parameter names and annotations from constructor into primitive class factory.
>
> Jesper Steen Møller has updated the pull request incrementally with one additional commit since the last revision:
>
> - Emit parameter names (described JDK-8273202)
> - Keep type parameters
> - Provide useful test for primitive records in "RecordReading"
I combined this fix (which was incomplete, since it "de-erased" the method types incorrectly) with the fix for the problem in JDK-8273202, and a more useful example of incorrect compilation of primitive records.
I don't like hacking the erasure_field of the MethodSymbol, but I don't see another option, since the other lowering passes do similar nasty tricks when recording outer instances and capturing locals for inner classes.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/541
More information about the valhalla-dev
mailing list