Minor. Simplify ConstraintSystemUtilContext::createArgumentConstraintPosition

This commit is contained in:
Denis.Zharkov
2021-04-27 15:04:05 +03:00
committed by teamcityserver
parent 9c7982673b
commit dac5c31993
4 changed files with 10 additions and 12 deletions
@@ -9,7 +9,6 @@ import org.jetbrains.kotlin.resolve.calls.inference.model.ArgumentConstraintPosi
import org.jetbrains.kotlin.resolve.calls.inference.model.FixVariableConstraintPosition
import org.jetbrains.kotlin.resolve.calls.model.PostponedAtomWithRevisableExpectedType
import org.jetbrains.kotlin.types.model.KotlinTypeMarker
import org.jetbrains.kotlin.types.model.TypeConstructorMarker
import org.jetbrains.kotlin.types.model.TypeVariableMarker
/*
@@ -25,7 +24,7 @@ interface ConstraintSystemUtilContext {
fun KotlinTypeMarker.refineType(): KotlinTypeMarker
// PostponedArgumentInputTypesResolver
fun <T> createArgumentConstraintPosition(argument: T): ArgumentConstraintPosition<T>
fun createArgumentConstraintPosition(argument: PostponedAtomWithRevisableExpectedType): ArgumentConstraintPosition<*>
fun <T> createFixVariableConstraintPosition(variable: TypeVariableMarker, atom: T): FixVariableConstraintPosition<T>
fun extractLambdaParameterTypesFromDeclaration(declaration: PostponedAtomWithRevisableExpectedType): List<KotlinTypeMarker?>?
fun PostponedAtomWithRevisableExpectedType.isAnonymousFunction(): Boolean
@@ -26,7 +26,7 @@ abstract class DeclaredUpperBoundConstraintPosition<T>(val typeParameter: T) : C
override fun toString(): String = "DeclaredUpperBound $typeParameter"
}
abstract class ArgumentConstraintPosition<T>(val argument: T) : ConstraintPosition(), OnlyInputTypeConstraintPosition {
abstract class ArgumentConstraintPosition<out T>(val argument: T) : ConstraintPosition(), OnlyInputTypeConstraintPosition {
override fun toString(): String = "Argument $argument"
}