Possible compiler bug? Code compiles on 8 but not 11
David Grieve
David.Grieve at microsoft.com
Fri Jan 31 18:36:42 UTC 2020
I have some code that compiles on 8 but not on 11. With 11 (11.0.5, to be exact), the compiler gives an error:
> Factory.java
> Error:(9, 25) java: incompatible types: java.lang.Object cannot be converted to Manager<java.lang.String>
This can be fixed with an explicit cast. But it seems to me that the cast should not be needed.
I'm hoping to get an answer for why this compiles cleanly on 8, but not 11.
I have uploaded a small sample that reproduces to http://cr.openjdk.java.net/~dgrieve/javac-bug.zip
More information about the compiler-dev
mailing list