[FIR/NI] Refactor type variable gathering from lambda types
Motivation: - drop getArguments from type context as a duplicate of getArgumentList - reduce the number of collection allocations in getAllDeeplyRelatedTypeVariables Additional minor improvements, test data fixes
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@ class ClassicConstraintSystemUtilContext(
|
||||
return FixVariableConstraintPositionImpl(variable, atom) as FixVariableConstraintPosition<T>
|
||||
}
|
||||
|
||||
override fun extractParameterTypesFromDeclaration(declaration: PostponedAtomWithRevisableExpectedType): List<KotlinTypeMarker?>? {
|
||||
override fun extractLambdaParameterTypesFromDeclaration(declaration: PostponedAtomWithRevisableExpectedType): List<KotlinTypeMarker?>? {
|
||||
require(declaration is ResolvedAtom)
|
||||
return when (val atom = declaration.atom) {
|
||||
is FunctionExpression -> {
|
||||
|
||||
+1
-3
@@ -20,10 +20,8 @@ import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
||||
class KotlinConstraintSystemCompleter(
|
||||
private val resultTypeResolver: ResultTypeResolver,
|
||||
val variableFixationFinder: VariableFixationFinder,
|
||||
private val ctx: ConstraintSystemUtilContext,
|
||||
private val postponedArgumentInputTypesResolver: PostponedArgumentInputTypesResolver,
|
||||
) {
|
||||
private val postponedArgumentInputTypesResolver = PostponedArgumentInputTypesResolver(resultTypeResolver, variableFixationFinder, ctx)
|
||||
|
||||
fun runCompletion(
|
||||
c: ConstraintSystemCompletionContext,
|
||||
completionMode: ConstraintSystemCompletionMode,
|
||||
|
||||
Reference in New Issue
Block a user