From d36dd12f582172a2241976947fcd6f90469900e7 Mon Sep 17 00:00:00 2001 From: Pavel Kirpichenkov Date: Tue, 14 Jan 2020 19:29:46 +0300 Subject: [PATCH] [NI] Restore old behaviour of `AbstractPartialBodyResolveTest` Smartcasts between partial and full resolution mode should almost never match, comparing smartcasted types in test runner is incorrect in general case. Mute failing test until decision about correct behaviour (KT-35922). --- .../kotlin/idea/resolve/AbstractPartialBodyResolveTest.kt | 8 +------- tests/mute-common.csv | 3 ++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/idea/tests/org/jetbrains/kotlin/idea/resolve/AbstractPartialBodyResolveTest.kt b/idea/tests/org/jetbrains/kotlin/idea/resolve/AbstractPartialBodyResolveTest.kt index b0946ca426b..4b5a2e5aad2 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/resolve/AbstractPartialBodyResolveTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/resolve/AbstractPartialBodyResolveTest.kt @@ -149,13 +149,7 @@ abstract class AbstractPartialBodyResolveTest : KotlinLightCodeInsightFixtureTes } else { expression } - - val nonDataFlowAwareType = bindingContext.getType(expressionWithType) - val type = getDataFlowAwareTypes( - expressionWithType, - bindingContext, - nonDataFlowAwareType - ).singleOrNull() ?: nonDataFlowAwareType + val type = bindingContext.getType(expressionWithType) return ResolveData(target, type, processedStatements) } diff --git a/tests/mute-common.csv b/tests/mute-common.csv index 7672f0f5132..4c782d2c776 100644 --- a/tests/mute-common.csv +++ b/tests/mute-common.csv @@ -41,6 +41,7 @@ org.jetbrains.kotlin.idea.quickfix.QuickFixTestGenerated.Libraries.testTestNG, E org.jetbrains.kotlin.idea.refactoring.move.MultiModuleMoveTestGenerated.testMoveFromJsModuleToJvmModule_MoveFromJsModuleToJvmModule, KT-34106 org.jetbrains.kotlin.idea.refactoring.move.MultiModuleMoveTestGenerated.testMoveFromJvmModuleToJsModule_MoveFromJvmModuleToJsModule, KT-34106 org.jetbrains.kotlin.idea.refactoring.move.MultiModuleMoveTestGenerated.testMoveJdkDependentToJsModule_MoveJdkDependentToJsModule, KT-34106 +org.jetbrains.kotlin.idea.resolve.PartialBodyResolveTestGenerated.testSmartCastInTheSameStatement, KT-35922 org.jetbrains.kotlin.idea.run.RunConfigurationTest.testWithModuleForJdk9, Always red org.jetbrains.kotlin.idea.spring.tests.references.SpringReferenceNavigationTestGenerated.testPackageReferenceInComponentScan, Always red because of test data org.jetbrains.kotlin.idea.stubs.MultiFileHighlightingTestGenerated.testTopLevelMembersReference, Always red @@ -52,4 +53,4 @@ org.jetbrains.kotlin.jps.build.IncrementalJvmJpsTestGenerated.WithJava.JavaUsedI org.jetbrains.kotlin.psi.injection.StringInterpolationInjectionTest.testInterpolationSimpleName, Stable failure during run may work in debug org.jetbrains.kotlin.shortenRefs.ShortenRefsTestGenerated.testExtensionForObject2, Always red org.jetbrains.kotlin.util.KotlinVersionsTest.testVersionsAreConsistent, KT-35567 -org.jetbrains.kotlinx.serialization.SerializationIrBytecodeListingTestGenerated.testBasic, Broken between 20 nov and 10 dec \ No newline at end of file +org.jetbrains.kotlinx.serialization.SerializationIrBytecodeListingTestGenerated.testBasic, Broken between 20 nov and 10 dec