On Mon, 6 Oct 2025 21:30:25 GMT, Chen Liang <[email protected]> wrote:

>> still a work in progress
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 1451:
> 
>> 1449:                     // Field may not have an initializer
>> 1450:                     if ((sym.flags() & HASINIT) != 0) {
>> 1451:                         if (!sym.type.hasTag(ARRAY) || !isIndexed) {
> 
> Does this work for complex ones like `(this.a = stuff)[b] = 5`?
> 
> Maybe we can try updating `isInLHS` to point to a JCTree and all the tests to 
> be something like `tree == isInLHS` so this just won't run for array indexed 
> trees?

at least this test case is handled correctly, it could be that other cases 
won't be treated properly but we would need a test case

-------------

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1664#discussion_r2416436916

Reply via email to