diff --git a/idea/src/org/jetbrains/kotlin/idea/versions/UnsupportedAbiVersionNotificationPanelProvider.kt b/idea/src/org/jetbrains/kotlin/idea/versions/UnsupportedAbiVersionNotificationPanelProvider.kt index c55599c9983..31589404c6f 100644 --- a/idea/src/org/jetbrains/kotlin/idea/versions/UnsupportedAbiVersionNotificationPanelProvider.kt +++ b/idea/src/org/jetbrains/kotlin/idea/versions/UnsupportedAbiVersionNotificationPanelProvider.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,6 +51,7 @@ import org.jetbrains.kotlin.idea.framework.getJsStdLibJar import org.jetbrains.kotlin.idea.framework.getReflectJar import org.jetbrains.kotlin.idea.framework.getRuntimeJar import org.jetbrains.kotlin.idea.framework.getTestJar +import org.jetbrains.kotlin.idea.project.ProjectStructureUtil.isJsKotlinModule import org.jetbrains.kotlin.serialization.deserialization.BinaryVersion import java.awt.event.ComponentAdapter import java.awt.event.ComponentEvent @@ -334,12 +335,15 @@ class UnsupportedAbiVersionNotificationPanelProvider(private val project: Projec } fun collectBadRoots(module: Module): Collection> { - val badJVMRoots = getLibraryRootsWithAbiIncompatibleKotlinClasses(module) - val badJSRoots = getLibraryRootsWithAbiIncompatibleForKotlinJs(module) + val badRoots = + if (!isJsKotlinModule(module)) + getLibraryRootsWithAbiIncompatibleKotlinClasses(module) + else + getLibraryRootsWithAbiIncompatibleForKotlinJs(module) - if (badJVMRoots.isEmpty() && badJSRoots.isEmpty()) return emptyList() + if (badRoots.isEmpty()) return emptyList() - return (badJVMRoots + badJSRoots).toHashSet() + return badRoots.toHashSet() } } }