RFR: 8288130: compiler error with AP and explicit record accessor [v3]

Vicente Romero vromero at openjdk.org
Fri Jun 24 20:04:57 UTC 2022

On Fri, 24 Jun 2022 17:48:09 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> Vicente Romero has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>>  - Merge branch 'master' into JDK-8288130
>>  - adding some documentation
>>  - adding accompanying regression test
>>  - 8288130: compiler error with AP and explicit record accessor
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java line 1510:
>> 1508:             for (RecordComponent rc : recordComponents) {
>> 1509:                 /* it could be that a record erroneously declares two record components with the same name, in that
>> 1510:                  * case we need to use the position to disambiguate
> I'd suggest to consider renaming this method. It does not "get" the record component, it (re-)creates it The `addIfMissing` parameter appears to be always `true`, and can be removed.

I agree


PR: https://git.openjdk.org/jdk/pull/9160

More information about the compiler-dev mailing list