On Wed, 3 Jun 2026 20:56:04 GMT, Maurizio Cimadamore <[email protected]> wrote:
>> When dealing with strict fields with initializers at the time we track them >> there is no constructor that we can use to later retrieve them at lowering >> time. Those fields can drop on the floor and no proxies are created for >> them. This PR fixes this issue, >> >> TIA >> >> >> >> >> --------- >> - [X] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LocalProxyVarsGen.java > line 120: > >> 118: * we need to recover those now and add them to this constructor >> 119: */ >> 120: if (fieldsReadInPrologue.get(classDecl) != null) { > > We never clear this entry up, right? I wonder if it would be cleaner to first collect all the stuff that needs patching (and clear entries in the map) and then pass them to the addLocalProxiesFor method -- that method already accepts a Set anyway ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2507#discussion_r3351879735
