K2: Drop unused methods from FirInferenceSession
This commit is contained in:
committed by
Space Team
parent
9374cacdd6
commit
9a6bff958f
-10
@@ -14,8 +14,6 @@ import org.jetbrains.kotlin.fir.types.ConeKotlinType
|
||||
import org.jetbrains.kotlin.fir.types.ConeTypeVariableTypeConstructor
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilder
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompletionMode
|
||||
import org.jetbrains.kotlin.types.model.StubTypeMarker
|
||||
import org.jetbrains.kotlin.types.model.TypeVariableMarker
|
||||
|
||||
abstract class FirInferenceSession {
|
||||
companion object {
|
||||
@@ -33,8 +31,6 @@ abstract class FirInferenceSession {
|
||||
abstract fun <T> processPartiallyResolvedCall(call: T, resolutionMode: ResolutionMode) where T : FirResolvable, T : FirStatement
|
||||
abstract fun <T> addCompletedCall(call: T, candidate: Candidate) where T : FirResolvable, T : FirStatement
|
||||
|
||||
abstract fun registerStubTypes(map: Map<TypeVariableMarker, StubTypeMarker>)
|
||||
|
||||
abstract fun inferPostponedVariables(
|
||||
lambda: ResolvedLambdaAtom,
|
||||
constraintSystemBuilder: ConstraintSystemBuilder,
|
||||
@@ -42,7 +38,6 @@ abstract class FirInferenceSession {
|
||||
candidate: Candidate
|
||||
): Map<ConeTypeVariableTypeConstructor, ConeKotlinType>?
|
||||
|
||||
abstract fun clear()
|
||||
open fun <R> onCandidatesResolution(call: FirFunctionCall, candidatesResolutionCallback: () -> R) = candidatesResolutionCallback()
|
||||
}
|
||||
|
||||
@@ -58,9 +53,4 @@ abstract class FirStubInferenceSession : FirInferenceSession() {
|
||||
completionMode: ConstraintSystemCompletionMode,
|
||||
candidate: Candidate
|
||||
): Map<ConeTypeVariableTypeConstructor, ConeKotlinType>? = null
|
||||
|
||||
override fun registerStubTypes(map: Map<TypeVariableMarker, StubTypeMarker>) {}
|
||||
|
||||
override fun clear() {
|
||||
}
|
||||
}
|
||||
|
||||
-9
@@ -12,13 +12,11 @@ import org.jetbrains.kotlin.fir.resolve.ResolutionMode
|
||||
import org.jetbrains.kotlin.fir.resolve.calls.Candidate
|
||||
import org.jetbrains.kotlin.fir.resolve.calls.ResolutionContext
|
||||
import org.jetbrains.kotlin.fir.resolve.calls.candidate
|
||||
import org.jetbrains.kotlin.types.model.*
|
||||
|
||||
abstract class FirInferenceSessionForChainedResolve(
|
||||
protected val resolutionContext: ResolutionContext
|
||||
) : FirInferenceSession() {
|
||||
protected val partiallyResolvedCalls: MutableList<Pair<FirResolvable, Candidate>> = mutableListOf()
|
||||
private val completedCalls: MutableSet<FirResolvable> = mutableSetOf()
|
||||
|
||||
protected val components: BodyResolveComponents
|
||||
get() = resolutionContext.bodyResolveComponents
|
||||
@@ -31,13 +29,6 @@ abstract class FirInferenceSessionForChainedResolve(
|
||||
partiallyResolvedCalls += call to call.candidate
|
||||
}
|
||||
|
||||
override fun registerStubTypes(map: Map<TypeVariableMarker, StubTypeMarker>) {}
|
||||
|
||||
protected val FirResolvable.candidate: Candidate
|
||||
get() = candidate()!!
|
||||
|
||||
override fun clear() {
|
||||
partiallyResolvedCalls.clear()
|
||||
completedCalls.clear()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user