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 expression = argument.psiExpression ?: run {
|
||||||
val psiCall = (selectorCall as? PSIKotlinCall)?.psiCall ?: psiKotlinCall.psiCall
|
val psiCall = (selectorCall as? PSIKotlinCall)?.psiCall ?: psiKotlinCall.psiCall
|
||||||
report(
|
if (context.languageVersionSettings.supportsFeature(LanguageFeature.ProperTypeInferenceConstraintsProcessing)) {
|
||||||
RECEIVER_TYPE_MISMATCH.on(
|
report(
|
||||||
psiCall.calleeExpression ?: psiCall.callElement, error.upperKotlinType, error.lowerKotlinType
|
RECEIVER_TYPE_MISMATCH.on(
|
||||||
|
psiCall.calleeExpression ?: psiCall.callElement, error.upperKotlinType, error.lowerKotlinType
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
return
|
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
|
// LANGUAGE: -ProperTypeInferenceConstraintsProcessing
|
||||||
|
|
||||||
// FILE: Configuration.java
|
// FILE: Configuration.java
|
||||||
@@ -11,6 +12,6 @@ public class State<C extends Configuration<? extends State<C>>> {}
|
|||||||
// FILE: Main.kt
|
// FILE: Main.kt
|
||||||
fun setup(configuration: Configuration<*>) {
|
fun setup(configuration: Configuration<*>) {
|
||||||
configuration.apply {
|
configuration.apply {
|
||||||
<!RECEIVER_TYPE_MISMATCH!>directoryPath<!>
|
directoryPath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user