[NI] Add checkCanceled checks before resolving a candidate
This is an analogue that was done for old inference in CandidateResolver
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
package org.jetbrains.kotlin.resolve.calls
|
package org.jetbrains.kotlin.resolve.calls
|
||||||
|
|
||||||
import org.jetbrains.kotlin.config.LanguageFeature
|
import org.jetbrains.kotlin.config.LanguageFeature
|
||||||
|
import org.jetbrains.kotlin.progress.ProgressIndicatorAndCompilationCanceledStatus
|
||||||
import org.jetbrains.kotlin.resolve.calls.components.CallableReferenceResolver
|
import org.jetbrains.kotlin.resolve.calls.components.CallableReferenceResolver
|
||||||
import org.jetbrains.kotlin.resolve.calls.components.KotlinCallCompleter
|
import org.jetbrains.kotlin.resolve.calls.components.KotlinCallCompleter
|
||||||
import org.jetbrains.kotlin.resolve.calls.components.KotlinResolutionCallbacks
|
import org.jetbrains.kotlin.resolve.calls.components.KotlinResolutionCallbacks
|
||||||
@@ -45,6 +46,8 @@ class KotlinCallResolver(
|
|||||||
collectAllCandidates: Boolean,
|
collectAllCandidates: Boolean,
|
||||||
createFactoryProviderForInvoke: () -> CandidateFactoryProviderForInvoke<KotlinResolutionCandidate>
|
createFactoryProviderForInvoke: () -> CandidateFactoryProviderForInvoke<KotlinResolutionCandidate>
|
||||||
): CallResolutionResult {
|
): CallResolutionResult {
|
||||||
|
ProgressIndicatorAndCompilationCanceledStatus.checkCanceled()
|
||||||
|
|
||||||
kotlinCall.checkCallInvariants()
|
kotlinCall.checkCallInvariants()
|
||||||
|
|
||||||
val candidateFactory = SimpleCandidateFactory(
|
val candidateFactory = SimpleCandidateFactory(
|
||||||
@@ -99,6 +102,8 @@ class KotlinCallResolver(
|
|||||||
givenCandidates: Collection<GivenCandidate>,
|
givenCandidates: Collection<GivenCandidate>,
|
||||||
collectAllCandidates: Boolean
|
collectAllCandidates: Boolean
|
||||||
): CallResolutionResult {
|
): CallResolutionResult {
|
||||||
|
ProgressIndicatorAndCompilationCanceledStatus.checkCanceled()
|
||||||
|
|
||||||
kotlinCall.checkCallInvariants()
|
kotlinCall.checkCallInvariants()
|
||||||
val candidateFactory = SimpleCandidateFactory(
|
val candidateFactory = SimpleCandidateFactory(
|
||||||
callComponents, scopeTower, kotlinCall, resolutionCallbacks, callableReferenceResolver
|
callComponents, scopeTower, kotlinCall, resolutionCallbacks, callableReferenceResolver
|
||||||
|
|||||||
Reference in New Issue
Block a user