diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/AbstractTypeConstructor.kt b/core/descriptors/src/org/jetbrains/kotlin/types/AbstractTypeConstructor.kt index d3a4e02c62f..b77c41f87a0 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/AbstractTypeConstructor.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/AbstractTypeConstructor.kt @@ -153,7 +153,8 @@ abstract class AbstractTypeConstructor(storageManager: StorageManager) : TypeCon if (other !is TypeConstructor) return false // performance optimization: getFqName is slow method - if (other.hashCode() != hashCode()) return false + // Cast to Any is needed as a workaround for KT-45008. + if ((other as Any).hashCode() != hashCode()) return false // Sometimes we can get two classes from different modules with different counts of type parameters. // To avoid problems in type checker we suppose that it is different type constructors.