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.
11 lines
312 B
Kotlin
Vendored
11 lines
312 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNREACHABLE_CODE
|
|
// !WITH_NEW_INFERENCE
|
|
interface Tr<T> {
|
|
var v: T
|
|
}
|
|
|
|
fun test(t: Tr<out String>) {
|
|
// resolved as t.v = t.v + null!!, where type of right operand is String,
|
|
// so TYPE_MISMATCH: String is not <: of Captured(out String)
|
|
<!SETTER_PROJECTED_OUT!>t.v<!> += null!!
|
|
} |