diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DeclarationResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DeclarationResolver.kt index ed52616b41f..dee4e7ed5b3 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DeclarationResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DeclarationResolver.kt @@ -74,7 +74,7 @@ public class DeclarationResolver( for (descriptor in descriptors) { if (descriptor is ClassDescriptor) { for (descriptor2 in descriptors) { - if (descriptor identityEquals descriptor2) { + if (descriptor === descriptor2) { continue } diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/TypeUtils.kt b/core/descriptors/src/org/jetbrains/kotlin/types/TypeUtils.kt index 546cb50c360..f4b613c93b3 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/TypeUtils.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/TypeUtils.kt @@ -112,7 +112,7 @@ fun JetType.replaceAnnotations(newAnnotations: Annotations): JetType { } public fun JetTypeChecker.equalTypesOrNulls(type1: JetType?, type2: JetType?): Boolean { - if (type1 identityEquals type2) return true + if (type1 === type2) return true if (type1 == null || type2 == null) return false return equalTypes(type1, type2) } diff --git a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/DeclarationLookupObjectImpl.kt b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/DeclarationLookupObjectImpl.kt index 8c16044e6a3..7ae5a4451b1 100644 --- a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/DeclarationLookupObjectImpl.kt +++ b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/DeclarationLookupObjectImpl.kt @@ -59,7 +59,7 @@ public abstract class DeclarationLookupObjectImpl( } override fun equals(other: Any?): Boolean { - if (this identityEquals other) return true + if (this === other) return true if (other == null || javaClass != other.javaClass) return false val lookupObject = other as DeclarationLookupObjectImpl return descriptorsEqualWithSubstitution(descriptor, lookupObject.descriptor) && psiElement == lookupObject.psiElement diff --git a/j2k/src/org/jetbrains/kotlin/j2k/TypeVisitor.kt b/j2k/src/org/jetbrains/kotlin/j2k/TypeVisitor.kt index dd1abf45cae..0dc4296814e 100644 --- a/j2k/src/org/jetbrains/kotlin/j2k/TypeVisitor.kt +++ b/j2k/src/org/jetbrains/kotlin/j2k/TypeVisitor.kt @@ -58,7 +58,7 @@ class TypeVisitor( } override fun visitClassType(classType: PsiClassType): Type { - val mutability = if (classType identityEquals topLevelType) topLevelTypeMutability else Mutability.Default + val mutability = if (classType === topLevelType) topLevelTypeMutability else Mutability.Default val refElement = constructReferenceElement(classType, mutability) return ClassType(refElement, Nullability.Default, converter.settings) } diff --git a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/clean/removeDefaultInitializers.kt b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/clean/removeDefaultInitializers.kt index 192094d6ad7..4c41c3ccffe 100644 --- a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/clean/removeDefaultInitializers.kt +++ b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/clean/removeDefaultInitializers.kt @@ -101,7 +101,7 @@ private fun isNameInitialized( if (!op.isAssignment()) return false val arg1 = expr.getArg1() - if (arg1 is HasName && arg1.getName() identityEquals name) return true + if (arg1 is HasName && arg1.getName() === name) return true return false } diff --git a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/util/collectors/NameCollector.kt b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/util/collectors/NameCollector.kt index 6bb1f7a400f..d40d8814a91 100644 --- a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/util/collectors/NameCollector.kt +++ b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/util/collectors/NameCollector.kt @@ -42,7 +42,7 @@ class NameCollector(private val scope: JsScope) : RecursiveJsVisitor() { if (name == null || ident == null) return val nameCollected = names.get(ident) - assert(nameCollected == null || nameCollected identityEquals name) { "ambiguous identifier for $hasName" } + assert(nameCollected == null || nameCollected === name) { "ambiguous identifier for $hasName" } assert(scope.hasOwnName(ident)) { "non-local name was added $hasName" } names.put(ident, name)