From 7090abddcd261f8436342747631617457f60c2bf Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Mon, 25 Jul 2016 11:40:51 +0300 Subject: [PATCH] Data flow values: variable-based are no more compared with taking kind into account --- .../kotlin/resolve/calls/smartcasts/IdentifierInfo.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/smartcasts/IdentifierInfo.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/smartcasts/IdentifierInfo.kt index 1abc5e2ea0f..f6237162ae8 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/smartcasts/IdentifierInfo.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/smartcasts/IdentifierInfo.kt @@ -41,10 +41,9 @@ interface IdentifierInfo { class Variable(val variable: VariableDescriptor, override val kind: DataFlowValue.Kind) : IdentifierInfo { - override fun equals(other: Any?) = - other is Variable && variable == other.variable && kind.isStable() == other.kind.isStable() + override fun equals(other: Any?) = other is Variable && variable == other.variable - override fun hashCode() = variable.hashCode() + 31 * (if (kind.isStable()) 1 else 0) + override fun hashCode() = variable.hashCode() override fun toString() = variable.toString() }