RFR: 8315134: javac inference seems to be capturing types incorrectly
Vicente Romero
vromero at openjdk.org
Tue Aug 29 16:17:11 UTC 2023
On Tue, 29 Aug 2023 10:40:19 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> > But this is unsound.
>
> A "more correct" solution would be to treat the supertype derivation as an inference problem - e.g. posit that given `Foo<?>` that is some supertype `Sup<Foo<alpha>>`, where `alpha` is an inference variable (likely with some `capture` constraints). But, needless to say, this requires a lot of spec (and compiler) work to get right.
>
> Anyway, for the time being, as I suggested last time, I believe the best course of action is to do nothing, and treat this as a "known issue".
Ok, I forgot about the previous discussion, thanks.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15463#issuecomment-1697759246
More information about the compiler-dev
mailing list