On Thu, 5 May 2022 18:11:54 GMT, Vicente Romero <vrom...@openjdk.org> wrote:
>> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflecting review feedback. > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 4217: > >> 4215: } >> 4216: ListBuffer<BindingSymbol> outBindings = new ListBuffer<>(); >> 4217: List<Type> recordTypes = expectedRecordTypes; > > nit: probably a matter of style but why not reusing the already declared > `expectedRecordTypes` declaring a new variable seems unnecessary Please note the full `expectedRecordTypes` are used for error reporting, but the reference to `List` in `recordTypes` is overwritten in the loop (at the time of an error report, it may not longer point to the full expected types, and hence cannot be used for error reporting). ------------- PR: https://git.openjdk.java.net/jdk/pull/8516