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.
This commit is contained in:
+1
-1
@@ -5,6 +5,6 @@ interface Tr<T> {
|
||||
}
|
||||
|
||||
fun test(t: Tr<*>) {
|
||||
<!OI;SETTER_PROJECTED_OUT!>t.v<!> = t
|
||||
<!SETTER_PROJECTED_OUT!>t.v<!> = <!NI;TYPE_MISMATCH!>t<!>
|
||||
t.v checkType { _<Tr<*>>() }
|
||||
}
|
||||
+2
-2
@@ -8,7 +8,7 @@ interface Tr<T> {
|
||||
|
||||
fun test(t: Tr<*>) {
|
||||
t.v = null!!
|
||||
<!OI;SETTER_PROJECTED_OUT!>t.v<!> = ""
|
||||
<!OI;SETTER_PROJECTED_OUT!>t.v<!> = null
|
||||
<!SETTER_PROJECTED_OUT!>t.v<!> = ""
|
||||
<!SETTER_PROJECTED_OUT!>t.v<!> = null
|
||||
t.v checkType { _<Any?>() }
|
||||
}
|
||||
Vendored
+1
-1
@@ -7,5 +7,5 @@ interface Tr<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)
|
||||
<!OI;SETTER_PROJECTED_OUT!>t.v<!> += null!!
|
||||
<!SETTER_PROJECTED_OUT!>t.v<!> += null!!
|
||||
}
|
||||
Reference in New Issue
Block a user