RFR: JEP 359-Records: compiler code
Vicente Romero
vicente.romero at oracle.com
Thu Oct 31 13:22:25 UTC 2019
Hi Srikanth,
On 10/30/19 11:41 PM, Srikanth wrote:
>
>
> On 30/10/19 11:37 PM, Vicente Romero wrote:
>> (12) Compact constructor trees are modified in in
>> com.sun.tools.javac.parser.JavacParser#recordDeclaration to become
>> elaborated tree - I thought this practice of modifying parse trees in
>> the early stages is frowned upon ?? (Other parse tree transformations
>> also happen here)
>>
>> right but no other feature allows to declare a parameter-less method.
>> If not expanded here the compact constructor would have to be
>> expanded in TypeEnter, which probably is not very nice either, so I
>> didn't see a perfect solution
>
> It may be quite a bit of work, but the canonical solution would be to
> introduce a new node type to model these. Not asking it to be done.
> Just saying.
yep, what you are saying sounds good, we could revisit this later on
>
> Srikanth
>
Thanks,
Vicente
More information about the compiler-dev
mailing list