Files
kotlin-fork/compiler/testData/diagnostics/tests/kt13401.kt
T
Mikhail Zarechenskiy 787a8bb9bd Revert "[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI"
This reverts commit 7c4101e21c.

 #KT-31866 Fixed
 #KT-31868 Fixed
 #EA-125401 Fixed
 #KT-25290 Open
2019-06-07 12:31:38 +03:00

18 lines
374 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// 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
}
fun foo(arg: Inner<*>) = arg.getT()
}