Replace usage of ClassicTCContext with abstract context in NewCSTCalculator
This commit is contained in:
committed by
Mikhail Glukhikh
parent
0276a6262f
commit
6215662e33
+1
-4
@@ -16,9 +16,6 @@
|
||||
|
||||
package org.jetbrains.kotlin.resolve.calls
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.resolve.constants.IntegerLiteralTypeConstructor
|
||||
import org.jetbrains.kotlin.types.*
|
||||
import org.jetbrains.kotlin.types.checker.*
|
||||
import org.jetbrains.kotlin.types.AbstractNullabilityChecker.hasPathByNotMarkedNullableNodes
|
||||
@@ -181,7 +178,7 @@ object NewCommonSuperTypeCalculator {
|
||||
nullable = false
|
||||
)
|
||||
|
||||
val typeCheckerContext = ClassicTypeCheckerContext(false)
|
||||
val typeCheckerContext = newBaseTypeCheckerContext(false)
|
||||
|
||||
/**
|
||||
* Sometimes one type can have several supertypes with given type constructor, suppose A <: List<Int> and A <: List<Double>.
|
||||
|
||||
+3
-1
@@ -86,7 +86,9 @@ class ResultTypeResolver(
|
||||
val lowerConstraints = variableWithConstraints.constraints.filter { it.kind == ConstraintKind.LOWER && isProperType(it.type) }
|
||||
if (lowerConstraints.isNotEmpty()) {
|
||||
val types = sinkIntegerLiteralTypes(lowerConstraints.map { it.type })
|
||||
val commonSuperType = with(NewCommonSuperTypeCalculator) { commonSuperType(types) }
|
||||
val commonSuperType = with(NewCommonSuperTypeCalculator) {
|
||||
this@findSubType.commonSuperType(types)
|
||||
}
|
||||
/**
|
||||
*
|
||||
* fun <T> Array<out T>.intersect(other: Iterable<T>) {
|
||||
|
||||
Reference in New Issue
Block a user