org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintPositionAndErrorsImpl.kt Maven / Gradle / Ivy
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.resolve.calls.inference.model
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
import org.jetbrains.kotlin.resolve.calls.model.*
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.types.model.TypeVariableMarker
class ExplicitTypeParameterConstraintPositionImpl(
typeArgument: SimpleTypeArgument
) : ExplicitTypeParameterConstraintPosition(typeArgument)
class InjectedAnotherStubTypeConstraintPositionImpl(builderInferenceLambdaOfInjectedStubType: LambdaKotlinCallArgument) :
InjectedAnotherStubTypeConstraintPosition(builderInferenceLambdaOfInjectedStubType)
class BuilderInferenceSubstitutionConstraintPositionImpl(
builderInferenceLambda: LambdaKotlinCallArgument,
initialConstraint: InitialConstraint,
isFromNotSubstitutedDeclaredUpperBound: Boolean = false
) : BuilderInferenceSubstitutionConstraintPosition(
builderInferenceLambda, initialConstraint, isFromNotSubstitutedDeclaredUpperBound
)
class ExpectedTypeConstraintPositionImpl(topLevelCall: KotlinCall) : ExpectedTypeConstraintPosition(topLevelCall)
class DeclaredUpperBoundConstraintPositionImpl(
typeParameter: TypeParameterDescriptor
) : DeclaredUpperBoundConstraintPosition(typeParameter) {
override fun toString() = "DeclaredUpperBound ${typeParameter.name} from ${typeParameter.containingDeclaration}"
}
class ArgumentConstraintPositionImpl(argument: KotlinCallArgument) : ArgumentConstraintPosition(argument)
class CallableReferenceConstraintPositionImpl(val callableReferenceCall: CallableReferenceKotlinCall) :
CallableReferenceConstraintPosition(callableReferenceCall)
class ReceiverConstraintPositionImpl(argument: KotlinCallArgument) : ReceiverConstraintPosition(argument)
class FixVariableConstraintPositionImpl(
variable: TypeVariableMarker,
resolvedAtom: ResolvedAtom?
) : FixVariableConstraintPosition(variable, resolvedAtom)
class KnownTypeParameterConstraintPositionImpl(typeArgument: KotlinType) : KnownTypeParameterConstraintPosition(typeArgument)
class LambdaArgumentConstraintPositionImpl(lambda: ResolvedLambdaAtom) : LambdaArgumentConstraintPosition(lambda)
class DelegatedPropertyConstraintPositionImpl(topLevelCall: KotlinCall) : DelegatedPropertyConstraintPosition(topLevelCall)
class NotEnoughInformationForTypeParameterImpl(
typeVariable: TypeVariableMarker,
resolvedAtom: ResolvedAtom,
couldBeResolvedWithUnrestrictedBuilderInference: Boolean
) : NotEnoughInformationForTypeParameter(typeVariable, resolvedAtom, couldBeResolvedWithUnrestrictedBuilderInference)