On Thu, 26 Feb 2026 17:18:50 GMT, Hannes Wallnöfer <[email protected]> wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java line >> 518: >> >>> 516: } >>> 517: >>> 518: ClassSymbol sym = (ClassSymbol) types.skipTypeVars(type, >>> false).tsym; >> >> I could be wrong but this `types.skipTypeVars` invocation should be >> unnecessary. `tsym` should always be the erased version. I have found >> another instance of this pattern in javadoc which probably can be removed too > > You are right for the common case where `type` is a parameterized class. But > `type` could itself be a type variable, in which case we need to convert it > to a class for the member lookup. I'm adding a comment to make the purpose of > this clear. right makes sense ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29547#discussion_r2860382413
