From 7be9a2ef17c6b747dadc84c2d284432b6c6eafd5 Mon Sep 17 00:00:00 2001 From: Dmitriy Dolovov Date: Thu, 9 Apr 2020 18:40:57 +0700 Subject: [PATCH] HMPP. Avoid leaking platform-specific dependencies into common libraries Issue #KMM-217 --- .../kotlin/idea/caches/project/LibraryDependenciesCache.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/LibraryDependenciesCache.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/LibraryDependenciesCache.kt index 98c1d362909..2744803b322 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/LibraryDependenciesCache.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/LibraryDependenciesCache.kt @@ -96,7 +96,7 @@ class LibraryDependenciesCacheImpl(private val project: Project) : LibraryDepend * @return true if it's OK to add a dependency from a library with platform [from] to a library with platform [to] */ private fun compatiblePlatforms(from: TargetPlatform, to: TargetPlatform): Boolean { - return from == to || to.isCommon() + return from === to || to.containsAll(from) || to.isCommon() } private fun getLibraryUsageIndex(): LibraryUsageIndex {