K1: don't report RECEIVER_TYPE_MISMATCH with -ProperTypeInferenceConstraintProcessing

Related to KT-55056
#KT-57854 Fixed
This commit is contained in:
Mikhail Glukhikh
2023-04-26 14:53:58 +02:00
committed by Space Team
parent 04812332f9
commit 4188bca9b8
3 changed files with 8 additions and 21 deletions
@@ -629,11 +629,13 @@ class DiagnosticReporterByTrackingStrategy(
val expression = argument.psiExpression ?: run {
val psiCall = (selectorCall as? PSIKotlinCall)?.psiCall ?: psiKotlinCall.psiCall
report(
RECEIVER_TYPE_MISMATCH.on(
psiCall.calleeExpression ?: psiCall.callElement, error.upperKotlinType, error.lowerKotlinType
if (context.languageVersionSettings.supportsFeature(LanguageFeature.ProperTypeInferenceConstraintsProcessing)) {
report(
RECEIVER_TYPE_MISMATCH.on(
psiCall.calleeExpression ?: psiCall.callElement, error.upperKotlinType, error.lowerKotlinType
)
)
)
}
return
}