Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/varProjection/setterNotProjectedOutAssign.kt
T
Dmitriy Novozhilov 21f0557502 Fix compatibility of CapturedTypeConstructor and NewCapturedTypeConstructor
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.
2019-01-24 10:53:58 +03:00

10 lines
193 B
Kotlin
Vendored

// !CHECK_TYPE
// !WITH_NEW_INFERENCE
interface Tr<T> {
var v: Tr<T>
}
fun test(t: Tr<*>) {
<!SETTER_PROJECTED_OUT!>t.v<!> = <!NI;TYPE_MISMATCH!>t<!>
t.v checkType { _<Tr<*>>() }
}