diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/KotlinTypeRefinerImpl.kt b/core/descriptors/src/org/jetbrains/kotlin/types/KotlinTypeRefinerImpl.kt index d408f415010..5224a6785d5 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/KotlinTypeRefinerImpl.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/KotlinTypeRefinerImpl.kt @@ -77,6 +77,7 @@ class KotlinTypeRefinerImpl( @TypeRefinement override fun refineType(type: KotlinTypeMarker): KotlinType { require(type is KotlinType) + if (type.constructor.declarationDescriptor?.module == moduleDescriptor) return type return when { !type.needsRefinement() -> type