[FIR] Don't approximate captured types
This fixes some type argument mismatch errors caused by a captured type being approximated and then captured again. Some places need to be adapted to work with captured types that previously only worked with approximated types. #KT-62959 Fixed
This commit is contained in:
committed by
Space Team
parent
b6d7f35ebf
commit
251827c9aa
compiler/fir/analysis-tests/testData/resolve/smartcasts/problems/smartcastToStarProjectedSubclass.kt
Vendored
+1
-1
@@ -15,7 +15,7 @@ public interface Option<T> {
|
||||
// FILE: test.kt
|
||||
fun test_1(option: Option<Pair<String, String>>?) {
|
||||
if (option is Option.Some<*>) {
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<kotlin.String, kotlin.String>..kotlin.Pair<kotlin.String, kotlin.String>?!")!>option.get()<!>.first
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("CapturedType(*)!! & kotlin.Pair<kotlin.String, kotlin.String>..CapturedType(*)? & kotlin.Pair<kotlin.String, kotlin.String>?")!>option.get()<!>.first
|
||||
x.length
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user