FE: perform IOT approximation after resolution & inference
#KT-54917 Fixed
This commit is contained in:
committed by
Space Team
parent
7884d9a61e
commit
fa6b1e24f9
+1
@@ -105,6 +105,7 @@ open class TypeApproximatorConfiguration {
|
|||||||
object FinalApproximationAfterResolutionAndInference :
|
object FinalApproximationAfterResolutionAndInference :
|
||||||
AbstractCapturedTypesApproximation(CaptureStatus.FROM_EXPRESSION) {
|
AbstractCapturedTypesApproximation(CaptureStatus.FROM_EXPRESSION) {
|
||||||
override val integerLiteralConstantType: Boolean get() = true
|
override val integerLiteralConstantType: Boolean get() = true
|
||||||
|
override val integerConstantOperatorType: Boolean get() = true
|
||||||
override val intersectionTypesInContravariantPositions: Boolean get() = true
|
override val intersectionTypesInContravariantPositions: Boolean get() = true
|
||||||
|
|
||||||
override val convertToNonRawVersionAfterApproximationInK2: Boolean get() = true
|
override val convertToNonRawVersionAfterApproximationInK2: Boolean get() = true
|
||||||
|
|||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
// WITH_STDLIB
|
|
||||||
// FIR_DUMP
|
|
||||||
|
|
||||||
fun foo() {
|
|
||||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<IOT>")!>foo(1 to 2)<!>
|
|
||||||
val x = foo(3 to 4)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun <T : Comparable<T>> foo(vararg values: Pair<T, T>): List<T> = TODO()
|
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
FILE: literalInCompletedGeneric.fir.kt
|
FILE: literalInCompletedGeneric.kt
|
||||||
public final fun foo(): R|kotlin/Unit| {
|
public final fun foo(): R|kotlin/Unit| {
|
||||||
R|/foo|<R|kotlin/Int|>(vararg(Int(1).R|kotlin/to|<R|kotlin/Int|, R|kotlin/Int|>(Int(2))))
|
R|/foo|<R|kotlin/Int|>(vararg(Int(1).R|kotlin/to|<R|kotlin/Int|, R|kotlin/Int|>(Int(2))))
|
||||||
lval x: R|kotlin/collections/List<IOT>| = R|/foo|<R|kotlin/Int|>(vararg(Int(3).R|kotlin/to|<R|kotlin/Int|, R|kotlin/Int|>(Int(4))))
|
lval x: R|kotlin/collections/List<kotlin/Int>| = R|/foo|<R|kotlin/Int|>(vararg(Int(3).R|kotlin/to|<R|kotlin/Int|, R|kotlin/Int|>(Int(4))))
|
||||||
}
|
}
|
||||||
public final fun <T : R|kotlin/Comparable<T>|> foo(vararg values: R|kotlin/Array<out kotlin/Pair<T, T>>|): R|kotlin/collections/List<T>| {
|
public final fun <T : R|kotlin/Comparable<T>|> foo(vararg values: R|kotlin/Array<out kotlin/Pair<T, T>>|): R|kotlin/collections/List<T>| {
|
||||||
^foo R|kotlin/TODO|()
|
^foo R|kotlin/TODO|()
|
||||||
|
|||||||
+1
@@ -1,3 +1,4 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
// FIR_DUMP
|
// FIR_DUMP
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user