RFR: 8343580: Type error with inner classes of generic classes in functions generic by outer

Chen Liang liach at openjdk.org
Wed May 21 14:53:51 UTC 2025


On Wed, 21 May 2025 14:46:35 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:

>> Nah, I was more thinking about
>> 
>> <T, U extends Getters<T>, G extends U>
>
> I think that wouldn't be a problem.
> 
> In the original example we try to type-check `G.Getter`. 
> With your example `<T, U extends Getters<T>, G extends U>` we would type check `G.Getter` for validity and then `U.Getter`. But maybe I am wrong. 
> 
> In any case, both cases deserve corresponding test cases and correct treatment. Thanks @liach. Will update.

You are right. I missed that this call `allparams` is already recursive!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25346#discussion_r2100494812


More information about the compiler-dev mailing list