Minor. Reformat some inference files
This commit is contained in:
committed by
Space Team
parent
9a6bff958f
commit
c163f86ecb
+9
-9
@@ -50,7 +50,7 @@ class ConstraintSystemCompleter(components: BodyResolveComponents, private val c
|
||||
candidateReturnType: ConeKotlinType,
|
||||
context: ResolutionContext,
|
||||
collectVariablesFromContext: Boolean = false,
|
||||
analyze: (PostponedResolvedAtom) -> Unit
|
||||
analyze: (PostponedResolvedAtom) -> Unit,
|
||||
) = c.runCompletion(completionMode, topLevelAtoms, candidateReturnType, context, collectVariablesFromContext, analyze)
|
||||
|
||||
private fun ConstraintSystemCompletionContext.runCompletion(
|
||||
@@ -59,7 +59,7 @@ class ConstraintSystemCompleter(components: BodyResolveComponents, private val c
|
||||
topLevelType: ConeKotlinType,
|
||||
context: ResolutionContext,
|
||||
collectVariablesFromContext: Boolean = false,
|
||||
analyze: (PostponedResolvedAtom) -> Unit
|
||||
analyze: (PostponedResolvedAtom) -> Unit,
|
||||
) {
|
||||
val topLevelTypeVariables = topLevelType.extractTypeVariables()
|
||||
|
||||
@@ -186,7 +186,7 @@ class ConstraintSystemCompleter(components: BodyResolveComponents, private val c
|
||||
topLevelType: ConeKotlinType,
|
||||
postponedArguments: List<PostponedResolvedAtom>,
|
||||
allTypeVariables: List<TypeConstructorMarker>,
|
||||
analyze: (PostponedResolvedAtom) -> Unit
|
||||
analyze: (PostponedResolvedAtom) -> Unit,
|
||||
): Boolean {
|
||||
if (completionMode != ConstraintSystemCompletionMode.FULL) return false
|
||||
|
||||
@@ -349,7 +349,7 @@ class ConstraintSystemCompleter(components: BodyResolveComponents, private val c
|
||||
|
||||
private fun ConstraintSystemCompletionContext.getOrderedAllTypeVariables(
|
||||
collectVariablesFromContext: Boolean,
|
||||
topLevelAtoms: List<FirStatement>
|
||||
topLevelAtoms: List<FirStatement>,
|
||||
): List<TypeConstructorMarker> {
|
||||
if (collectVariablesFromContext) {
|
||||
return notFixedTypeVariables.keys.toList()
|
||||
@@ -425,7 +425,7 @@ class ConstraintSystemCompleter(components: BodyResolveComponents, private val c
|
||||
|
||||
private fun fixVariable(
|
||||
c: ConstraintSystemCompletionContext,
|
||||
variableWithConstraints: VariableWithConstraints
|
||||
variableWithConstraints: VariableWithConstraints,
|
||||
) {
|
||||
val resultType = inferenceComponents.resultTypeResolver.findResultType(
|
||||
c,
|
||||
@@ -461,7 +461,7 @@ class ConstraintSystemCompleter(components: BodyResolveComponents, private val c
|
||||
|
||||
private fun findResolvedAtomBy(
|
||||
typeVariable: TypeVariableMarker,
|
||||
topLevelAtoms: List<FirStatement>
|
||||
topLevelAtoms: List<FirStatement>,
|
||||
): FirStatement? {
|
||||
|
||||
fun FirStatement.findFirstAtomContainingVariable(): FirStatement? {
|
||||
@@ -497,7 +497,7 @@ class ConstraintSystemCompleter(components: BodyResolveComponents, private val c
|
||||
private fun createCannotInferErrorType(
|
||||
typeParameterSymbol: FirTypeParameterSymbol?,
|
||||
message: String,
|
||||
isUninferredParameter: Boolean = false
|
||||
isUninferredParameter: Boolean = false,
|
||||
): ConeErrorType {
|
||||
val diagnostic = when (typeParameterSymbol) {
|
||||
null -> ConeSimpleDiagnostic(message, DiagnosticKind.CannotInferParameterType)
|
||||
@@ -506,7 +506,7 @@ class ConstraintSystemCompleter(components: BodyResolveComponents, private val c
|
||||
message,
|
||||
)
|
||||
}
|
||||
return ConeErrorType(diagnostic, isUninferredParameter,)
|
||||
return ConeErrorType(diagnostic, isUninferredParameter)
|
||||
}
|
||||
|
||||
|
||||
@@ -576,7 +576,7 @@ fun FirStatement.processAllContainingCallCandidates(processBlocks: Boolean, proc
|
||||
|
||||
private fun FirResolvable.processCandidateIfApplicable(
|
||||
processor: (Candidate) -> Unit,
|
||||
processBlocks: Boolean
|
||||
processBlocks: Boolean,
|
||||
) {
|
||||
val candidate = (calleeReference as? FirNamedReferenceWithCandidate)?.candidate ?: return
|
||||
processor(candidate)
|
||||
|
||||
+1
-1
@@ -244,7 +244,7 @@ fun LambdaWithTypeVariableAsExpectedTypeAtom.transformToResolvedLambda(
|
||||
csBuilder: ConstraintSystemBuilder,
|
||||
context: ResolutionContext,
|
||||
expectedType: ConeKotlinType? = null,
|
||||
returnTypeVariable: ConeTypeVariableForLambdaReturnType? = null
|
||||
returnTypeVariable: ConeTypeVariableForLambdaReturnType? = null,
|
||||
): ResolvedLambdaAtom {
|
||||
val fixedExpectedType = (csBuilder.buildCurrentSubstitutor() as ConeSubstitutor)
|
||||
.substituteOrSelf(expectedType ?: this.expectedType)
|
||||
|
||||
Reference in New Issue
Block a user