FIR IDE: Avoid resolving elvis operator, because it doesn't make sense
There are intrinsics to which elvis operator's usages are resolved; however, we do not want to expose those intrinsics through the high-level resolve
This commit is contained in:
+2
@@ -119,6 +119,8 @@ internal class KtFe10CallResolver(
|
||||
get() = analysisSession.token
|
||||
|
||||
override fun resolveCall(psi: KtElement): KtCallInfo? = with(analysisContext.analyze(psi, AnalysisMode.PARTIAL_WITH_DIAGNOSTICS)) {
|
||||
if (psi.isNotResolvable()) return null
|
||||
|
||||
val parentBinaryExpression = psi.parentOfType<KtBinaryExpression>()
|
||||
val lhs = KtPsiUtil.deparenthesize(parentBinaryExpression?.left)
|
||||
val unwrappedPsi = KtPsiUtil.deparenthesize(psi as? KtExpression) ?: psi
|
||||
|
||||
+36
@@ -648,6 +648,42 @@ public class KtFe10ResolveCallTestGenerated extends AbstractKtFe10ResolveCallTes
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/smartCastImplicitExtensionReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvableOperator_elvis_1.kt")
|
||||
public void testUnresolvableOperator_elvis_1() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/unresolvableOperator_elvis_1.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvableOperator_elvis_2.kt")
|
||||
public void testUnresolvableOperator_elvis_2() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/unresolvableOperator_elvis_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvableOperator_eqeqeq_1.kt")
|
||||
public void testUnresolvableOperator_eqeqeq_1() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/unresolvableOperator_eqeqeq_1.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvableOperator_eqeqeq_2.kt")
|
||||
public void testUnresolvableOperator_eqeqeq_2() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/unresolvableOperator_eqeqeq_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvableOperator_excleqeq_1.kt")
|
||||
public void testUnresolvableOperator_excleqeq_1() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/unresolvableOperator_excleqeq_1.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvableOperator_excleqeq_2.kt")
|
||||
public void testUnresolvableOperator_excleqeq_2() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/unresolvableOperator_excleqeq_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedSuperReference.kt")
|
||||
public void testUnresolvedSuperReference() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user