Files
kotlin-fork/compiler/testData/diagnostics/tests/kt13401.fir.kt
T
Denis.Zharkov 2ecba6ac39 Remove WITH_NEW_INFERENCE directive from all tests
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00

18 lines
381 B
Kotlin
Vendored

// NI_EXPECTED_FILE
// See KT-13401: SOE in VarianceChecker
interface Rec<T: Rec<T>> {
fun t(): T
}
interface Super<out U> {
fun foo(p: Rec<*>) = p.t()
}
// Related variance errors
class Owner<in T> {
inner class Inner<U : <!TYPE_VARIANCE_CONFLICT!>T<!>>(val u: U) {
fun getT() = u
}
<!TYPE_VARIANCE_CONFLICT!>fun foo(arg: Inner<*>)<!> = arg.getT()
}