Fix delegated property resolve with intermediate ID provideDelegate
#KT-37406 Fixed
This commit is contained in:
+4
-1
@@ -26,8 +26,11 @@ class CompletionModeCalculator {
|
||||
candidate: KotlinResolutionCandidate,
|
||||
expectedType: UnwrappedType?,
|
||||
returnType: UnwrappedType?,
|
||||
trivialConstraintTypeInferenceOracle: TrivialConstraintTypeInferenceOracle
|
||||
trivialConstraintTypeInferenceOracle: TrivialConstraintTypeInferenceOracle,
|
||||
inferenceSession: InferenceSession
|
||||
): ConstraintSystemCompletionMode = with(candidate) {
|
||||
inferenceSession.computeCompletionMode(candidate)?.let { return it }
|
||||
|
||||
val csCompleterContext = getSystem().asConstraintSystemCompleterContext()
|
||||
|
||||
if (candidate.isErrorCandidate()) return ConstraintSystemCompletionMode.FULL
|
||||
|
||||
+5
-1
@@ -5,8 +5,8 @@
|
||||
|
||||
package org.jetbrains.kotlin.resolve.calls.components
|
||||
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.components.KotlinConstraintSystemCompleter
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.NewTypeVariable
|
||||
import org.jetbrains.kotlin.resolve.calls.model.*
|
||||
import org.jetbrains.kotlin.types.TypeConstructor
|
||||
import org.jetbrains.kotlin.types.UnwrappedType
|
||||
@@ -28,6 +28,9 @@ interface InferenceSession {
|
||||
override fun writeOnlyStubs(callInfo: SingleCallResolutionResult): Boolean = false
|
||||
override fun callCompleted(resolvedAtom: ResolvedAtom): Boolean = false
|
||||
override fun shouldCompleteResolvedSubAtomsOf(resolvedCallAtom: ResolvedCallAtom) = true
|
||||
override fun computeCompletionMode(
|
||||
candidate: KotlinResolutionCandidate
|
||||
): KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode? = null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +48,7 @@ interface InferenceSession {
|
||||
fun writeOnlyStubs(callInfo: SingleCallResolutionResult): Boolean
|
||||
fun callCompleted(resolvedAtom: ResolvedAtom): Boolean
|
||||
fun shouldCompleteResolvedSubAtomsOf(resolvedCallAtom: ResolvedCallAtom): Boolean
|
||||
fun computeCompletionMode(candidate: KotlinResolutionCandidate): KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode?
|
||||
}
|
||||
|
||||
interface PartialCallInfo {
|
||||
|
||||
+3
-1
@@ -47,7 +47,9 @@ class KotlinCallCompleter(
|
||||
candidate.checkSamWithVararg(diagnosticHolder)
|
||||
|
||||
val completionMode =
|
||||
CompletionModeCalculator.computeCompletionMode(candidate, expectedType, returnType, trivialConstraintTypeInferenceOracle)
|
||||
CompletionModeCalculator.computeCompletionMode(
|
||||
candidate, expectedType, returnType, trivialConstraintTypeInferenceOracle, resolutionCallbacks.inferenceSession
|
||||
)
|
||||
|
||||
return when (completionMode) {
|
||||
ConstraintSystemCompletionMode.FULL -> {
|
||||
|
||||
Reference in New Issue
Block a user