Minor. Reformat PostponedArgumentInputTypesResolver.kt
This commit is contained in:
committed by
teamcityserver
parent
61fe70b600
commit
3fb17cfa9a
+12
-3
@@ -359,7 +359,11 @@ class PostponedArgumentInputTypesResolver(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (pathFromRelatedTopLevelVariable != null && relatedTopLevelVariable != null) {
|
if (pathFromRelatedTopLevelVariable != null && relatedTopLevelVariable != null) {
|
||||||
getBuilder().putBuiltFunctionalExpectedTypeForPostponedArgument(relatedTopLevelVariable, pathFromRelatedTopLevelVariable, newExpectedType)
|
getBuilder().putBuiltFunctionalExpectedTypeForPostponedArgument(
|
||||||
|
relatedTopLevelVariable,
|
||||||
|
pathFromRelatedTopLevelVariable,
|
||||||
|
newExpectedType
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
getBuilder().putBuiltFunctionalExpectedTypeForPostponedArgument(expectedTypeConstructor, newExpectedType)
|
getBuilder().putBuiltFunctionalExpectedTypeForPostponedArgument(expectedTypeConstructor, newExpectedType)
|
||||||
}
|
}
|
||||||
@@ -395,7 +399,8 @@ class PostponedArgumentInputTypesResolver(
|
|||||||
val parameterTypesInfo =
|
val parameterTypesInfo =
|
||||||
c.extractParameterTypesInfo(argument, postponedArguments, dependencyProvider) ?: return@any false
|
c.extractParameterTypesInfo(argument, postponedArguments, dependencyProvider) ?: return@any false
|
||||||
val newExpectedType =
|
val newExpectedType =
|
||||||
c.buildNewFunctionalExpectedType(argument, parameterTypesInfo, dependencyProvider, topLevelTypeVariables) ?: return@any false
|
c.buildNewFunctionalExpectedType(argument, parameterTypesInfo, dependencyProvider, topLevelTypeVariables)
|
||||||
|
?: return@any false
|
||||||
|
|
||||||
argument.reviseExpectedType(newExpectedType)
|
argument.reviseExpectedType(newExpectedType)
|
||||||
|
|
||||||
@@ -488,7 +493,11 @@ class PostponedArgumentInputTypesResolver(
|
|||||||
val relatedVariables = type.extractArgumentsForFunctionalTypeOrSubtype()
|
val relatedVariables = type.extractArgumentsForFunctionalTypeOrSubtype()
|
||||||
.flatMap { getAllDeeplyRelatedTypeVariables(it, dependencyProvider) }
|
.flatMap { getAllDeeplyRelatedTypeVariables(it, dependencyProvider) }
|
||||||
val variableForFixation = variableFixationFinder.findFirstVariableForFixation(
|
val variableForFixation = variableFixationFinder.findFirstVariableForFixation(
|
||||||
this@fixNextReadyVariableForParameterType, relatedVariables, postponedArguments, ConstraintSystemCompletionMode.FULL, topLevelType
|
this@fixNextReadyVariableForParameterType,
|
||||||
|
relatedVariables,
|
||||||
|
postponedArguments,
|
||||||
|
ConstraintSystemCompletionMode.FULL,
|
||||||
|
topLevelType
|
||||||
)
|
)
|
||||||
|
|
||||||
if (variableForFixation == null || !variableForFixation.hasProperConstraint)
|
if (variableForFixation == null || !variableForFixation.hasProperConstraint)
|
||||||
|
|||||||
Reference in New Issue
Block a user