On Fri, 29 Aug 2025 10:13:23 GMT, Maurizio Cimadamore <[email protected]>
wrote:
>> this is for cases when we have an argument that is for example of the same
>> type as the current class so like:
>>
>> class Test {
>> String s;
>>
>> Test(Test t) {
>> // the owner of s is Test not MTH so we need to check what is the
>> qualifier for s which at the end is the argument
>> // `t` so we ignore it
>> String s1 = t.s;
>> super();
>> }
>> }
>
> yes, so isn't just checking owner.kind != TYP enough? (e.g. "not a field")
I tried to replace this with:
`if (!sym.isStatic() && sym.kind == VAR && sym.owner.kind == TYP) { ... }`
And no tests seem to fail.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/1523#discussion_r2310224467