On Fri, 12 Sep 2025 17:53:07 GMT, Vicente Romero <[email protected]> wrote:
>> Recent fix for [JDK-8359370](https://bugs.openjdk.org/browse/JDK-8359370) >> introduced a minor bug. This code should be accepted by javac: >> >> class SuperClass<T> { >> public SuperClass(Object o) {} >> } >> >> class Sub<T> extends SuperClass<T> { >> public Sub() { >> super(new Object() { >> void foo() { >> getClass(); >> } >> }); >> } >> } >> >> >> but it is currently rejected as the `getClass` invocation is considered to >> be an invocation of an instance method of class `Sub` > > Vicente Romero has updated the pull request incrementally with one additional > commit since the last revision: > > removing unnecessary check src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 1414: > 1412: } > 1413: tree = TreeInfo.skipParens(tree); > 1414: if (sym.kind == VAR && sym.owner.kind == TYP) { also removed a check for static symbol here, not needed now ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1567#discussion_r2345044114
