Don't create inconsistent types (with contradictive use site and declaration site variances) for star projections with corresponding contravariant type parameters during substitution
^KT-41388 Fixed
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
interface I
|
||||
|
||||
interface Foo<in L : I, in M>
|
||||
|
||||
interface Bar<T> {
|
||||
fun test(x: Foo<*, T>)
|
||||
}
|
||||
|
||||
fun foo(x: Any) {
|
||||
if (x is Bar<*>) {
|
||||
x::test
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String = "OK"
|
||||
Reference in New Issue
Block a user