RFR: 8334248: Invalid error for early construction local class constructor method reference [v7]
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Oct 3 11:18:38 UTC 2024
On Thu, 3 Oct 2024 10:20:15 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Tweak comments
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java line 3790:
>
>> 3788: Env<AttrContext> env,
>> 3789: TypeSymbol c,
>> 3790: Name name,
>
> It is probably a matter of style, but for me, it would be easier if `name` would be dropped, and `names._this` would be used in `findFirst`. It took me a while before I realized `name` can only be `this`, so there cannot be more than one, so `findFirst` is "find it or return null", not "if there are multiple, return one of them".
Good catch - this was mostly a leftover from the previous code
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19904#discussion_r1786049501
More information about the compiler-dev
mailing list