[NI] Report errors about inapplicable wrong receiver
Now it's possible because we don't commit trace with inapplicable `provideDelegate` operator (20e105c274)
This commit is contained in:
@@ -194,9 +194,13 @@ class PSICallResolver(
|
|||||||
1 -> {
|
1 -> {
|
||||||
val singleCandidate = result.single()
|
val singleCandidate = result.single()
|
||||||
|
|
||||||
val reportToTrace = singleCandidate.currentStatus.resultingApplicability != ResolutionCandidateApplicability.INAPPLICABLE_WRONG_RECEIVER
|
val isInapplicableReceiver = singleCandidate.currentStatus.resultingApplicability == ResolutionCandidateApplicability.INAPPLICABLE_WRONG_RECEIVER
|
||||||
|
|
||||||
val resolvedCall = kotlinToResolvedCallTransformer.transformAndReport<D>(singleCandidate, context, trace.takeIf { reportToTrace })
|
val resolvedCall = kotlinToResolvedCallTransformer.transformAndReport<D>(singleCandidate, context, trace.takeUnless { isInapplicableReceiver })
|
||||||
|
|
||||||
|
if (isInapplicableReceiver) {
|
||||||
|
tracingStrategy.unresolvedReferenceWrongReceiver(trace, listOf(resolvedCall))
|
||||||
|
}
|
||||||
return SingleOverloadResolutionResult(resolvedCall)
|
return SingleOverloadResolutionResult(resolvedCall)
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user