21f0557502
Now both of those classes implements one interface with `TypeProjection` property. That allows old captured type approximator use new captured types. That change fixes tests related to diagnostics: - SETTER_PROJECTED_OUT - DEBUG_INFO_UNRESOLVED_WITH_TARGET - UNRESOLVED_REFERENCE_WRONG_RECEIVER Also `typeProjection` property renamed to `projection` according to naming in NI.
18 lines
374 B
Kotlin
Vendored
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()
|
|
} |