K2: inline notFixedInputTypeVariables in ConstraintSystemCompleter
This commit is contained in:
committed by
Space Team
parent
b4e1fa8569
commit
c7bc8547da
+1
-4
@@ -245,12 +245,9 @@ class ConstraintSystemCompleter(components: BodyResolveComponents, private val c
|
|||||||
|
|
||||||
val lambdaArguments = postponedArguments.filterIsInstance<ResolvedLambdaAtom>().takeIf { it.isNotEmpty() } ?: return false
|
val lambdaArguments = postponedArguments.filterIsInstance<ResolvedLambdaAtom>().takeIf { it.isNotEmpty() } ?: return false
|
||||||
|
|
||||||
fun ResolvedLambdaAtom.notFixedInputTypeVariables(): List<TypeVariableTypeConstructorMarker> =
|
|
||||||
inputTypes.flatMap { it.extractTypeVariables() }.filter { it !in fixedTypeVariables }
|
|
||||||
|
|
||||||
var anyAnalyzed = false
|
var anyAnalyzed = false
|
||||||
for (argument in lambdaArguments) {
|
for (argument in lambdaArguments) {
|
||||||
val notFixedInputTypeVariables = argument.notFixedInputTypeVariables()
|
val notFixedInputTypeVariables = argument.inputTypes.flatMap { it.extractTypeVariables() }.filter { it !in fixedTypeVariables }
|
||||||
|
|
||||||
if (notFixedInputTypeVariables.isEmpty()) continue
|
if (notFixedInputTypeVariables.isEmpty()) continue
|
||||||
analyze(argument)
|
analyze(argument)
|
||||||
|
|||||||
Reference in New Issue
Block a user