Fix compilation after rebase
This commit is contained in:
+4
-2
@@ -132,8 +132,10 @@ class KotlinToResolvedCallTransformer(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST") val resolvedCall =
|
val resolvedCall = ktPrimitiveCompleter.completeResolvedCall(
|
||||||
ktPrimitiveCompleter.completeResolvedCall(candidate, baseResolvedCall.completedDiagnostic) as ResolvedCall<D>
|
candidate, baseResolvedCall.completedDiagnostic(resultSubstitutor)
|
||||||
|
) as ResolvedCall<D>
|
||||||
|
|
||||||
forwardCallToInferenceSession(baseResolvedCall, context, resolvedCall, tracingStrategy)
|
forwardCallToInferenceSession(baseResolvedCall, context, resolvedCall, tracingStrategy)
|
||||||
|
|
||||||
resolvedCall
|
resolvedCall
|
||||||
|
|||||||
+11
-11
@@ -7,9 +7,11 @@ package org.jetbrains.kotlin.resolve.calls.model
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor
|
import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor
|
||||||
import org.jetbrains.kotlin.resolve.calls.components.*
|
import org.jetbrains.kotlin.resolve.calls.components.CallableReferenceCandidate
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.buildResultingSubstitutor
|
import org.jetbrains.kotlin.resolve.calls.components.TypeArgumentsToParametersMapper
|
||||||
|
import org.jetbrains.kotlin.resolve.calls.components.extractInputOutputTypesFromCallableReferenceExpectedType
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.components.FreshVariableNewTypeSubstitutor
|
import org.jetbrains.kotlin.resolve.calls.inference.components.FreshVariableNewTypeSubstitutor
|
||||||
|
import org.jetbrains.kotlin.resolve.calls.inference.components.NewTypeSubstitutor
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage
|
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.model.NewConstraintError
|
import org.jetbrains.kotlin.resolve.calls.inference.model.NewConstraintError
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.model.TypeVariableForLambdaReturnType
|
import org.jetbrains.kotlin.resolve.calls.inference.model.TypeVariableForLambdaReturnType
|
||||||
@@ -184,16 +186,14 @@ sealed class CallResolutionResult(
|
|||||||
super.setAnalyzedResults(subResolvedAtoms)
|
super.setAnalyzedResults(subResolvedAtoms)
|
||||||
}
|
}
|
||||||
|
|
||||||
val completedDiagnostic: List<KotlinCallDiagnostic>
|
fun completedDiagnostic(substitutor: NewTypeSubstitutor): List<KotlinCallDiagnostic> {
|
||||||
get() {
|
return diagnostics.map {
|
||||||
val substitutor = constraintSystem.buildResultingSubstitutor()
|
if (it !is NewConstraintError) return@map it
|
||||||
return diagnostics.map {
|
val lowerType = it.lowerType.safeAs<KotlinType>()?.unwrap() ?: return@map it
|
||||||
if (it !is NewConstraintError) return@map it
|
val newLowerType = substitutor.safeSubstitute(lowerType)
|
||||||
val lowerType = it.lowerType.safeAs<KotlinType>()?.unwrap() ?: return@map it
|
NewConstraintError(newLowerType, it.upperType, it.position)
|
||||||
val newLowerType = substitutor.safeSubstitute(lowerType)
|
|
||||||
NewConstraintError(newLowerType, it.upperType, it.position)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override val atom: ResolutionAtom? get() = null
|
override val atom: ResolutionAtom? get() = null
|
||||||
|
|
||||||
|
|||||||
@@ -90,12 +90,13 @@ open class TypeApproximatorConfiguration {
|
|||||||
object CapturedAndIntegerLiteralsTypesApproximation : TypeApproximatorConfiguration.AbstractCapturedTypesApproximation(FROM_EXPRESSION) {
|
object CapturedAndIntegerLiteralsTypesApproximation : TypeApproximatorConfiguration.AbstractCapturedTypesApproximation(FROM_EXPRESSION) {
|
||||||
override val integerLiteralType: Boolean get() = true
|
override val integerLiteralType: Boolean get() = true
|
||||||
}
|
}
|
||||||
|
|
||||||
object IntegerLiteralsTypesApproximation : TypeApproximatorConfiguration.AllFlexibleSameValue() {
|
object IntegerLiteralsTypesApproximation : TypeApproximatorConfiguration.AllFlexibleSameValue() {
|
||||||
override val integerLiteralType: Boolean get() = true
|
override val integerLiteralType: Boolean get() = true
|
||||||
override val allFlexible: Boolean get() = true
|
override val allFlexible: Boolean get() = true
|
||||||
override val intersection get() = ALLOWED
|
override val intersection get() = ALLOWED
|
||||||
override val typeVariable: (TypeVariableTypeConstructor) -> Boolean get() = { true }
|
override val typeVariable: (TypeVariableTypeConstructorMarker) -> Boolean get() = { true }
|
||||||
override val capturedType: (NewCapturedType) -> Boolean get() = { true }
|
override fun capturedType(ctx: TypeSystemInferenceExtensionContext, type: CapturedTypeMarker): Boolean = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user