K1: don't report RECEIVER_TYPE_MISMATCH with -ProperTypeInferenceConstraintProcessing
Related to KT-55056 #KT-57854 Fixed
This commit is contained in:
committed by
Space Team
parent
04812332f9
commit
4188bca9b8
+6
-4
@@ -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
|
||||
}
|
||||
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
// LANGUAGE: -ProperTypeInferenceConstraintsProcessing
|
||||
|
||||
// FILE: Configuration.java
|
||||
public class Configuration<S extends State<? extends Configuration<S>>> {
|
||||
public String getDirectoryPath() { return ""; }
|
||||
}
|
||||
|
||||
// FILE: State.java
|
||||
public class State<C extends Configuration<? extends State<C>>> {}
|
||||
|
||||
// FILE: Main.kt
|
||||
fun setup(configuration: Configuration<*>) {
|
||||
configuration.apply {
|
||||
directoryPath
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// LANGUAGE: -ProperTypeInferenceConstraintsProcessing
|
||||
|
||||
// FILE: Configuration.java
|
||||
@@ -11,6 +12,6 @@ public class State<C extends Configuration<? extends State<C>>> {}
|
||||
// FILE: Main.kt
|
||||
fun setup(configuration: Configuration<*>) {
|
||||
configuration.apply {
|
||||
<!RECEIVER_TYPE_MISMATCH!>directoryPath<!>
|
||||
directoryPath
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user