diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/project/AnalyzerFacadeProvider.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/project/AnalyzerFacadeProvider.kt index c1de3f55a79..75c53c09f61 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/project/AnalyzerFacadeProvider.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/project/AnalyzerFacadeProvider.kt @@ -29,7 +29,7 @@ object AnalyzerFacadeProvider { // otherwise we would be forced to add casts on the call site of setupResolverForProject fun getAnalyzerFacade(targetPlatform: TargetPlatform): AnalyzerFacade { return when (targetPlatform) { - JvmPlatform -> JvmAnalyzerFacade + is JvmPlatform -> JvmAnalyzerFacade JsPlatform -> JsAnalyzerFacade else -> throw IllegalArgumentException("Unsupported platform: $targetPlatform") } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/ExpectedCompletionUtils.kt b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/ExpectedCompletionUtils.kt index 7e5f72c024f..b0c161bf753 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/ExpectedCompletionUtils.kt +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/ExpectedCompletionUtils.kt @@ -140,7 +140,7 @@ object ExpectedCompletionUtils { fun itemsShouldExist(fileText: String, platform: TargetPlatform?): Array { return when (platform) { - JvmPlatform -> processProposalAssertions(fileText, EXIST_LINE_PREFIX, EXIST_JAVA_ONLY_LINE_PREFIX) + is JvmPlatform -> processProposalAssertions(fileText, EXIST_LINE_PREFIX, EXIST_JAVA_ONLY_LINE_PREFIX) JsPlatform -> processProposalAssertions(fileText, EXIST_LINE_PREFIX, EXIST_JS_ONLY_LINE_PREFIX) null -> processProposalAssertions(fileText, EXIST_LINE_PREFIX) else -> throw IllegalArgumentException(UNSUPPORTED_PLATFORM_MESSAGE) @@ -149,7 +149,7 @@ object ExpectedCompletionUtils { fun itemsShouldAbsent(fileText: String, platform: TargetPlatform?): Array { return when (platform) { - JvmPlatform -> processProposalAssertions(fileText, ABSENT_LINE_PREFIX, ABSENT_JAVA_LINE_PREFIX, EXIST_JS_ONLY_LINE_PREFIX) + is JvmPlatform -> processProposalAssertions(fileText, ABSENT_LINE_PREFIX, ABSENT_JAVA_LINE_PREFIX, EXIST_JS_ONLY_LINE_PREFIX) JsPlatform -> processProposalAssertions(fileText, ABSENT_LINE_PREFIX, ABSENT_JS_LINE_PREFIX, EXIST_JAVA_ONLY_LINE_PREFIX) null -> processProposalAssertions(fileText, ABSENT_LINE_PREFIX) else -> throw IllegalArgumentException(UNSUPPORTED_PLATFORM_MESSAGE) @@ -185,7 +185,7 @@ object ExpectedCompletionUtils { fun getExpectedNumber(fileText: String, platform: TargetPlatform?): Int? { return when (platform) { null -> InTextDirectivesUtils.getPrefixedInt(fileText, NUMBER_LINE_PREFIX) - JvmPlatform -> getPlatformExpectedNumber(fileText, NUMBER_JAVA_LINE_PREFIX) + is JvmPlatform -> getPlatformExpectedNumber(fileText, NUMBER_JAVA_LINE_PREFIX) JsPlatform -> getPlatformExpectedNumber(fileText, NUMBER_JS_LINE_PREFIX) else -> throw IllegalArgumentException(UNSUPPORTED_PLATFORM_MESSAGE) } diff --git a/idea/src/org/jetbrains/kotlin/idea/actions/ConfigureKotlinInProjectAction.kt b/idea/src/org/jetbrains/kotlin/idea/actions/ConfigureKotlinInProjectAction.kt index 24c21ab0d86..74b59f3d14a 100644 --- a/idea/src/org/jetbrains/kotlin/idea/actions/ConfigureKotlinInProjectAction.kt +++ b/idea/src/org/jetbrains/kotlin/idea/actions/ConfigureKotlinInProjectAction.kt @@ -60,6 +60,6 @@ class ConfigureKotlinJsInProjectAction: ConfigureKotlinInProjectAction() { class ConfigureKotlinJavaInProjectAction: ConfigureKotlinInProjectAction() { override fun getApplicableConfigurators(project: Project) = getAbleToRunConfigurators(project).filter { - it.targetPlatform == JvmPlatform + it.targetPlatform is JvmPlatform } } \ No newline at end of file