[light classes] simplify hashCode functions
^KTIJ-21151
This commit is contained in:
Generated
+7
@@ -0,0 +1,7 @@
|
|||||||
|
<component name="ProjectDictionaryState">
|
||||||
|
<dictionary name="dimonchik0036">
|
||||||
|
<words>
|
||||||
|
<w>ktij</w>
|
||||||
|
</words>
|
||||||
|
</dictionary>
|
||||||
|
</component>
|
||||||
+12
-36
@@ -1,17 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2016 JetBrains s.r.o.
|
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
*
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.asJava.classes
|
package org.jetbrains.kotlin.asJava.classes
|
||||||
@@ -63,24 +52,20 @@ open class KtLightClassForFacadeImpl constructor(
|
|||||||
|
|
||||||
private val firstFileInFacade by lazyPub { files.iterator().next() }
|
private val firstFileInFacade by lazyPub { files.iterator().next() }
|
||||||
|
|
||||||
private val hashCode: Int =
|
|
||||||
computeHashCode()
|
|
||||||
|
|
||||||
private val packageFqName: FqName =
|
|
||||||
facadeClassFqName.parent()
|
|
||||||
|
|
||||||
private val modifierList: PsiModifierList =
|
private val modifierList: PsiModifierList =
|
||||||
LightModifierList(manager, KotlinLanguage.INSTANCE, PsiModifier.PUBLIC, PsiModifier.FINAL)
|
LightModifierList(manager, KotlinLanguage.INSTANCE, PsiModifier.PUBLIC, PsiModifier.FINAL)
|
||||||
|
|
||||||
private val implementsList: LightEmptyImplementsList =
|
private val implementsList: LightEmptyImplementsList =
|
||||||
LightEmptyImplementsList(manager)
|
LightEmptyImplementsList(manager)
|
||||||
|
|
||||||
private val packageClsFile = FakeFileForLightClass(
|
private val packageClsFile by lazyPub {
|
||||||
firstFileInFacade,
|
FakeFileForLightClass(
|
||||||
lightClass = { this },
|
firstFileInFacade,
|
||||||
stub = { javaFileStub },
|
lightClass = { this },
|
||||||
packageFqName = packageFqName
|
stub = { javaFileStub },
|
||||||
)
|
packageFqName = facadeClassFqName.parent()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
override fun getParent(): PsiElement = containingFile
|
override fun getParent(): PsiElement = containingFile
|
||||||
|
|
||||||
@@ -210,14 +195,7 @@ open class KtLightClassForFacadeImpl constructor(
|
|||||||
return arrayOf(PsiType.getJavaLangObject(manager, resolveScope))
|
return arrayOf(PsiType.getJavaLangObject(manager, resolveScope))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode() = hashCode
|
override fun hashCode() = facadeClassFqName.hashCode()
|
||||||
|
|
||||||
private fun computeHashCode(): Int {
|
|
||||||
var result = manager.hashCode()
|
|
||||||
result = 31 * result + files.hashCode()
|
|
||||||
result = 31 * result + facadeClassFqName.hashCode()
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (other == null || this::class.java != other::class.java) {
|
if (other == null || this::class.java != other::class.java) {
|
||||||
@@ -227,10 +205,8 @@ open class KtLightClassForFacadeImpl constructor(
|
|||||||
val lightClass = other as KtLightClassForFacadeImpl
|
val lightClass = other as KtLightClassForFacadeImpl
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
|
|
||||||
if (this.hashCode != lightClass.hashCode) return false
|
|
||||||
if (manager != lightClass.manager) return false
|
|
||||||
if (files != lightClass.files) return false
|
|
||||||
if (facadeClassFqName != lightClass.facadeClassFqName) return false
|
if (facadeClassFqName != lightClass.facadeClassFqName) return false
|
||||||
|
if (files != lightClass.files) return false
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-17
@@ -1,11 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.asJava.classes
|
package org.jetbrains.kotlin.asJava.classes
|
||||||
|
|
||||||
import com.intellij.openapi.util.Comparing
|
|
||||||
import com.intellij.openapi.util.Key
|
import com.intellij.openapi.util.Key
|
||||||
import com.intellij.psi.*
|
import com.intellij.psi.*
|
||||||
import com.intellij.psi.impl.PsiSuperMethodImplUtil
|
import com.intellij.psi.impl.PsiSuperMethodImplUtil
|
||||||
@@ -43,10 +42,6 @@ open class KtLightClassForScript(val script: KtScript) : KtLazyLightClass(script
|
|||||||
protected open val javaFileStub: PsiJavaFileStub?
|
protected open val javaFileStub: PsiJavaFileStub?
|
||||||
get() = getLightClassDataHolder().javaFileStub
|
get() = getLightClassDataHolder().javaFileStub
|
||||||
|
|
||||||
private val hashCode: Int = computeHashCode()
|
|
||||||
|
|
||||||
private val packageFqName: FqName = script.fqName.parent()
|
|
||||||
|
|
||||||
private val modifierList: PsiModifierList = LightModifierList(manager, KotlinLanguage.INSTANCE, PsiModifier.PUBLIC)
|
private val modifierList: PsiModifierList = LightModifierList(manager, KotlinLanguage.INSTANCE, PsiModifier.PUBLIC)
|
||||||
|
|
||||||
private val scriptImplementsList: LightEmptyImplementsList = LightEmptyImplementsList(manager)
|
private val scriptImplementsList: LightEmptyImplementsList = LightEmptyImplementsList(manager)
|
||||||
@@ -62,13 +57,13 @@ open class KtLightClassForScript(val script: KtScript) : KtLazyLightClass(script
|
|||||||
script.containingKtFile,
|
script.containingKtFile,
|
||||||
lightClass = { this },
|
lightClass = { this },
|
||||||
stub = { javaFileStub },
|
stub = { javaFileStub },
|
||||||
packageFqName = packageFqName,
|
packageFqName = fqName.parent(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override val kotlinOrigin: KtClassOrObject? get() = null
|
override val kotlinOrigin: KtClassOrObject? get() = null
|
||||||
|
|
||||||
val fqName: FqName = script.fqName
|
val fqName: FqName get() = script.fqName
|
||||||
|
|
||||||
override fun getModifierList() = modifierList
|
override fun getModifierList() = modifierList
|
||||||
|
|
||||||
@@ -164,13 +159,7 @@ open class KtLightClassForScript(val script: KtScript) : KtLazyLightClass(script
|
|||||||
|
|
||||||
override fun getScope(): PsiElement = parent
|
override fun getScope(): PsiElement = parent
|
||||||
|
|
||||||
override fun hashCode() = hashCode
|
override fun hashCode() = script.hashCode()
|
||||||
|
|
||||||
private fun computeHashCode(): Int {
|
|
||||||
var result = manager.hashCode()
|
|
||||||
result = 31 * result + script.hashCode()
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (other == null || this::class.java != other::class.java) {
|
if (other == null || this::class.java != other::class.java) {
|
||||||
@@ -180,8 +169,6 @@ open class KtLightClassForScript(val script: KtScript) : KtLazyLightClass(script
|
|||||||
val lightClass = other as? KtLightClassForScript ?: return false
|
val lightClass = other as? KtLightClassForScript ?: return false
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
|
|
||||||
if (this.hashCode != lightClass.hashCode) return false
|
|
||||||
if (manager != lightClass.manager) return false
|
|
||||||
if (script != lightClass.script) return false
|
if (script != lightClass.script) return false
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -168,8 +168,8 @@ abstract class KtLightClassForSourceDeclaration(
|
|||||||
|
|
||||||
val aClass = other as KtLightClassForSourceDeclaration
|
val aClass = other as KtLightClassForSourceDeclaration
|
||||||
|
|
||||||
if (classOrObject != aClass.classOrObject) return false
|
|
||||||
if (jvmDefaultMode != aClass.jvmDefaultMode) return false
|
if (jvmDefaultMode != aClass.jvmDefaultMode) return false
|
||||||
|
if (classOrObject != aClass.classOrObject) return false
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ import org.jetbrains.kotlin.resolve.BindingContext
|
|||||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||||
import org.jetbrains.kotlin.resolve.descriptorUtil.isPublishedApi
|
import org.jetbrains.kotlin.resolve.descriptorUtil.isPublishedApi
|
||||||
import org.jetbrains.kotlin.resolve.inline.isInlineOnly
|
import org.jetbrains.kotlin.resolve.inline.isInlineOnly
|
||||||
import org.jetbrains.kotlin.resolve.jvm.annotations.*
|
import org.jetbrains.kotlin.resolve.jvm.annotations.hasJvmSyntheticAnnotation
|
||||||
import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOriginKind
|
import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOriginKind
|
||||||
|
|
||||||
internal class UltraLightMembersCreator(
|
internal class UltraLightMembersCreator(
|
||||||
@@ -160,7 +160,7 @@ internal class UltraLightMembersCreator(
|
|||||||
other.psiMethod == psiMethod &&
|
other.psiMethod == psiMethod &&
|
||||||
other.expression == expression
|
other.expression == expression
|
||||||
|
|
||||||
override fun hashCode(): Int = psiMethod.hashCode() * 31 + expression.hashCode()
|
override fun hashCode(): Int = psiMethod.hashCode()
|
||||||
|
|
||||||
override fun toString(): String = "KtUltraLightAnnotationMethod(method=$psiMethod, expression=$expression"
|
override fun toString(): String = "KtUltraLightAnnotationMethod(method=$psiMethod, expression=$expression"
|
||||||
|
|
||||||
|
|||||||
+8
-10
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -137,12 +137,10 @@ internal abstract class KtUltraLightMethod(
|
|||||||
override fun equals(other: Any?): Boolean = other === this ||
|
override fun equals(other: Any?): Boolean = other === this ||
|
||||||
other is KtUltraLightMethod &&
|
other is KtUltraLightMethod &&
|
||||||
other.methodIndex == methodIndex &&
|
other.methodIndex == methodIndex &&
|
||||||
other.delegate == delegate &&
|
super.equals(other) &&
|
||||||
super.equals(other)
|
other.delegate == delegate
|
||||||
|
|
||||||
override fun hashCode(): Int = super.hashCode()
|
override fun hashCode(): Int = super.hashCode().times(31).plus(methodIndex.hashCode())
|
||||||
.times(31).plus(delegate.hashCode())
|
|
||||||
.times(31).plus(methodIndex.hashCode())
|
|
||||||
|
|
||||||
override fun isDeprecated(): Boolean = _deprecated
|
override fun isDeprecated(): Boolean = _deprecated
|
||||||
}
|
}
|
||||||
@@ -196,10 +194,10 @@ internal class KtUltraLightMethodForSourceDeclaration(
|
|||||||
|
|
||||||
override val checkNeedToErasureParametersTypes: Boolean by lazyPub { computeCheckNeedToErasureParametersTypes(methodDescriptor) }
|
override val checkNeedToErasureParametersTypes: Boolean by lazyPub { computeCheckNeedToErasureParametersTypes(methodDescriptor) }
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean =
|
override fun equals(other: Any?): Boolean = other === this ||
|
||||||
other is KtUltraLightMethodForSourceDeclaration &&
|
other is KtUltraLightMethodForSourceDeclaration &&
|
||||||
other.forceToSkipNullabilityAnnotation == forceToSkipNullabilityAnnotation &&
|
other.forceToSkipNullabilityAnnotation == forceToSkipNullabilityAnnotation &&
|
||||||
super.equals(other)
|
super.equals(other)
|
||||||
|
|
||||||
override fun hashCode(): Int = super.hashCode() * 31 + forceToSkipNullabilityAnnotation.hashCode()
|
override fun hashCode(): Int = super.hashCode() * 31 + forceToSkipNullabilityAnnotation.hashCode()
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-11
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -17,15 +17,15 @@ import org.jetbrains.kotlin.asJava.elements.*
|
|||||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||||
import org.jetbrains.kotlin.builtins.isSuspendFunctionType
|
import org.jetbrains.kotlin.builtins.isSuspendFunctionType
|
||||||
import org.jetbrains.kotlin.codegen.AsmUtil
|
import org.jetbrains.kotlin.codegen.AsmUtil
|
||||||
import org.jetbrains.kotlin.codegen.coroutines.SUSPEND_FUNCTION_COMPLETION_PARAMETER_NAME
|
|
||||||
import org.jetbrains.kotlin.descriptors.*
|
|
||||||
import org.jetbrains.kotlin.load.kotlin.TypeMappingMode
|
|
||||||
import org.jetbrains.kotlin.types.KotlinType
|
|
||||||
import org.jetbrains.kotlin.codegen.AsmUtil.LABELED_THIS_PARAMETER
|
import org.jetbrains.kotlin.codegen.AsmUtil.LABELED_THIS_PARAMETER
|
||||||
import org.jetbrains.kotlin.codegen.AsmUtil.RECEIVER_PARAMETER_NAME
|
import org.jetbrains.kotlin.codegen.AsmUtil.RECEIVER_PARAMETER_NAME
|
||||||
|
import org.jetbrains.kotlin.codegen.coroutines.SUSPEND_FUNCTION_COMPLETION_PARAMETER_NAME
|
||||||
|
import org.jetbrains.kotlin.descriptors.*
|
||||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
|
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
|
||||||
|
import org.jetbrains.kotlin.load.kotlin.TypeMappingMode
|
||||||
import org.jetbrains.kotlin.psi.*
|
import org.jetbrains.kotlin.psi.*
|
||||||
import org.jetbrains.kotlin.psi.psiUtil.isPrivate
|
import org.jetbrains.kotlin.psi.psiUtil.isPrivate
|
||||||
|
import org.jetbrains.kotlin.types.KotlinType
|
||||||
|
|
||||||
internal class KtUltraLightSuspendContinuationParameter(
|
internal class KtUltraLightSuspendContinuationParameter(
|
||||||
private val ktFunction: KtFunction,
|
private val ktFunction: KtFunction,
|
||||||
@@ -57,8 +57,9 @@ internal class KtUltraLightSuspendContinuationParameter(
|
|||||||
|
|
||||||
override fun getType(): PsiType = psiType
|
override fun getType(): PsiType = psiType
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean =
|
override fun equals(other: Any?): Boolean = other === this ||
|
||||||
other is KtUltraLightSuspendContinuationParameter && other.ktFunction === this.ktFunction
|
other is KtUltraLightSuspendContinuationParameter &&
|
||||||
|
other.ktFunction === this.ktFunction
|
||||||
|
|
||||||
override fun isVarArgs(): Boolean = false
|
override fun isVarArgs(): Boolean = false
|
||||||
override fun hashCode(): Int = name.hashCode()
|
override fun hashCode(): Int = name.hashCode()
|
||||||
@@ -80,7 +81,7 @@ internal abstract class KtUltraLightParameter(
|
|||||||
override val kotlinOrigin: KtParameter?,
|
override val kotlinOrigin: KtParameter?,
|
||||||
protected val support: KtUltraLightSupport,
|
protected val support: KtUltraLightSupport,
|
||||||
private val ultraLightMethod: KtUltraLightMethod
|
private val ultraLightMethod: KtUltraLightMethod
|
||||||
) : org.jetbrains.kotlin.asJava.elements.LightParameter(
|
) : LightParameter(
|
||||||
name,
|
name,
|
||||||
PsiType.NULL,
|
PsiType.NULL,
|
||||||
ultraLightMethod,
|
ultraLightMethod,
|
||||||
@@ -129,10 +130,12 @@ internal abstract class KtUltraLightParameter(
|
|||||||
override fun getContainingFile(): PsiFile = method.containingFile
|
override fun getContainingFile(): PsiFile = method.containingFile
|
||||||
override fun getParent(): PsiElement = method.parameterList
|
override fun getParent(): PsiElement = method.parameterList
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean =
|
override fun equals(other: Any?): Boolean = other === this ||
|
||||||
other is KtUltraLightParameter && other.kotlinOrigin == this.kotlinOrigin
|
other is KtUltraLightParameter &&
|
||||||
|
other.javaClass == this.javaClass &&
|
||||||
|
other.ultraLightMethod == this.ultraLightMethod
|
||||||
|
|
||||||
override fun hashCode(): Int = kotlinOrigin.hashCode()
|
override fun hashCode(): Int = name.hashCode()
|
||||||
|
|
||||||
abstract override fun isVarArgs(): Boolean
|
abstract override fun isVarArgs(): Boolean
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-18
@@ -1,17 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2016 JetBrains s.r.o.
|
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
*
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.asJava.elements
|
package org.jetbrains.kotlin.asJava.elements
|
||||||
@@ -58,11 +47,10 @@ sealed class KtLightFieldImpl<D : PsiField>(
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean =
|
override fun equals(other: Any?): Boolean = this === other ||
|
||||||
this === other ||
|
other is KtLightFieldImpl<*> &&
|
||||||
(other is KtLightFieldImpl<*> &&
|
this.name == other.name &&
|
||||||
this.name == other.name &&
|
this.containingClass == other.containingClass
|
||||||
this.containingClass == other.containingClass)
|
|
||||||
|
|
||||||
override fun hashCode() = 31 * containingClass.hashCode() + name.hashCode()
|
override fun hashCode() = 31 * containingClass.hashCode() + name.hashCode()
|
||||||
|
|
||||||
|
|||||||
+3
-4
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -153,13 +153,12 @@ open class KtLightMethodImpl protected constructor(
|
|||||||
override fun equals(other: Any?): Boolean = other === this ||
|
override fun equals(other: Any?): Boolean = other === this ||
|
||||||
other is KtLightMethodImpl &&
|
other is KtLightMethodImpl &&
|
||||||
other.javaClass == javaClass &&
|
other.javaClass == javaClass &&
|
||||||
|
other.memberIndex == memberIndex &&
|
||||||
other.containingClass == containingClass &&
|
other.containingClass == containingClass &&
|
||||||
other.lightMemberOrigin == lightMemberOrigin &&
|
other.lightMemberOrigin == lightMemberOrigin &&
|
||||||
other.dummyDelegate == dummyDelegate &&
|
other.dummyDelegate == dummyDelegate
|
||||||
other.memberIndex == memberIndex
|
|
||||||
|
|
||||||
override fun hashCode(): Int = name.hashCode()
|
override fun hashCode(): Int = name.hashCode()
|
||||||
.times(31).plus(lightMemberOrigin.hashCode())
|
|
||||||
.times(31).plus(containingClass.hashCode())
|
.times(31).plus(containingClass.hashCode())
|
||||||
.times(31).plus(memberIndex.hashCode())
|
.times(31).plus(memberIndex.hashCode())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user