Rename "coroutine( inference) *" stuff into "builder inference *"
This commit is contained in:
committed by
TeamCityServer
parent
8e885da677
commit
261a04b587
+1
-1
@@ -38,7 +38,7 @@ interface KotlinResolutionStatelessCallbacks {
|
||||
fun isSuperExpression(receiver: SimpleKotlinCallArgument?): Boolean
|
||||
fun getScopeTowerForCallableReferenceArgument(argument: CallableReferenceKotlinCallArgument): ImplicitScopeTower
|
||||
fun getVariableCandidateIfInvoke(functionCall: KotlinCall): KotlinResolutionCandidate?
|
||||
fun isCoroutineCall(argument: KotlinCallArgument, parameter: ValueParameterDescriptor): Boolean
|
||||
fun isBuilderInferenceCall(argument: KotlinCallArgument, parameter: ValueParameterDescriptor): Boolean
|
||||
fun isApplicableCallForBuilderInference(descriptor: CallableDescriptor, languageVersionSettings: LanguageVersionSettings): Boolean
|
||||
|
||||
fun isOldIntersectionIsEmpty(types: Collection<KotlinType>): Boolean
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.descriptors.annotations.FilteredAnnotations
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.addSubsystemFromArgument
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompletionMode
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.CoroutinePosition
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.BuilderInferencePosition
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.LambdaArgumentConstraintPositionImpl
|
||||
import org.jetbrains.kotlin.resolve.calls.model.*
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
@@ -199,7 +199,7 @@ class PostponedArgumentsAnalyzer(
|
||||
val variable = variableWithConstraints.typeVariable
|
||||
|
||||
c.getBuilder().unmarkPostponedVariable(variable)
|
||||
c.getBuilder().addEqualityConstraint(variable.defaultType(c), resultType, CoroutinePosition)
|
||||
c.getBuilder().addEqualityConstraint(variable.defaultType(c), resultType, BuilderInferencePosition)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -272,7 +272,7 @@ internal object CreateFreshVariablesSubstitutor : ResolutionPart() {
|
||||
internal object PostponedVariablesInitializerResolutionPart : ResolutionPart() {
|
||||
override fun KotlinResolutionCandidate.process(workIndex: Int) {
|
||||
for ((argument, parameter) in resolvedCall.argumentToCandidateParameter) {
|
||||
if (!callComponents.statelessCallbacks.isCoroutineCall(argument, parameter)) continue
|
||||
if (!callComponents.statelessCallbacks.isBuilderInferenceCall(argument, parameter)) continue
|
||||
val receiverType = parameter.type.getReceiverTypeFromFunctionType() ?: continue
|
||||
|
||||
if (argument is LambdaKotlinCallArgument && !argument.hasBuilderInferenceAnnotation) {
|
||||
|
||||
Reference in New Issue
Block a user