[NI] Small improvements in callable reference resolution.
I'm not sure in this commit, but it fix some test -> let it be for now. And yes, now I do not know correct way for callable reference resolution, so for now it is just proposals.
This commit is contained in:
committed by
Mikhail Zarechenskiy
parent
7eabdeffb3
commit
5bb61d2d02
+6
-1
@@ -78,14 +78,19 @@ class KotlinCallCompleter(
|
|||||||
is VariableAsFunctionKotlinResolutionCandidate -> candidate.invokeCandidate
|
is VariableAsFunctionKotlinResolutionCandidate -> candidate.invokeCandidate
|
||||||
else -> candidate as SimpleKotlinResolutionCandidate
|
else -> candidate as SimpleKotlinResolutionCandidate
|
||||||
}
|
}
|
||||||
resolveCallableReferenceArguments(topLevelCall)
|
|
||||||
|
|
||||||
if (topLevelCall.prepareForCompletion(expectedType)) {
|
if (topLevelCall.prepareForCompletion(expectedType)) {
|
||||||
|
resolveCallableReferenceArguments(topLevelCall)
|
||||||
|
|
||||||
val c = candidate.lastCall.constraintSystem.asCallCompleterContext()
|
val c = candidate.lastCall.constraintSystem.asCallCompleterContext()
|
||||||
|
|
||||||
topLevelCall.competeCall(c, resolutionCallbacks)
|
topLevelCall.competeCall(c, resolutionCallbacks)
|
||||||
return toCompletedBaseResolvedCall(c, candidate, resolutionCallbacks)
|
return toCompletedBaseResolvedCall(c, candidate, resolutionCallbacks)
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// todo I'm not sure that we should do this
|
||||||
|
resolveCallableReferenceArguments(topLevelCall)
|
||||||
|
}
|
||||||
|
|
||||||
return ResolvedKotlinCall.OnlyResolvedKotlinCall(candidate)
|
return ResolvedKotlinCall.OnlyResolvedKotlinCall(candidate)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user