Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/projectionsScope/kt7296.fir.kt
T

16 lines
439 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
// !CHECK_TYPE
import java.util.ArrayList
class ListOfLists<T>(public val x : ArrayList<ArrayList<T>>)
fun main() {
val a : ArrayList<ArrayList<String>> = ArrayList()
val b : ListOfLists<String> = ListOfLists(a)
val c : ListOfLists<*> = b
val d : ArrayList<ArrayList<*>> = c.x
c.x checkType { <!INAPPLICABLE_CANDIDATE!>_<!><ArrayList<out ArrayList<*>>>() }
}