Missing variance check on private members #18588
Labels
area:typer
itype:bug
itype:soundness
Soundness bug (it lets us compile code that crashes at runtime with a ClassCastException)
Compiler version
From 3.0.0 to 3.3.1.
Minimized code
This code compiles fine, but fails at runtime with a
ClassCastException
. Note that it contains no@uncheckedVariance
annotations or forced down-casting:Note: I actually noticed this in the
lampepfl/gears
repository (see sample).Expectation
The compiler should issue an error like:
The text was updated successfully, but these errors were encountered: