diff --git a/core/descriptors/src/org/jetbrains/kotlin/platform/TargetPlatform.kt b/core/descriptors/src/org/jetbrains/kotlin/platform/TargetPlatform.kt index 4171238eaa24e..b2452f7e30052 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/platform/TargetPlatform.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/platform/TargetPlatform.kt @@ -77,7 +77,13 @@ interface TargetPlatformVersion { } } -fun TargetPlatform?.isCommon(): Boolean = this != null && this.size > 1 +fun TargetPlatform?.isCommon(): Boolean = this != null && size > 1 && iterator().let { i -> + val firstPlatformName = i.next().platformName + while (i.hasNext()) { + if (i.next().platformName != firstPlatformName) return@let true + } + false +} fun SimplePlatform.toTargetPlatform(): TargetPlatform = TargetPlatform(setOf(this))