File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
compiler/scala/tools/nsc/backend/icode
reflect/scala/reflect/internal/util Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,14 @@ trait Members {
108108 if (symbol eq other.symbol) 0
109109 else if (symbol isLess other.symbol) - 1
110110 else 1
111+
112+ override def equals (other : Any ): Boolean =
113+ other match {
114+ case other : IMember => (this compare other) == 0
115+ case _ => false
116+ }
117+
118+ override def hashCode = symbol.##
111119 }
112120
113121 /** Represent a class in ICode */
Original file line number Diff line number Diff line change @@ -133,6 +133,12 @@ quant)
133133 if (this .value < that.value) - 1
134134 else if (this .value > that.value) 1
135135 else 0
136+ override def equals (that : Any ): Boolean =
137+ that match {
138+ case that : Counter => (this compare that) == 0
139+ case _ => false
140+ }
141+ override def hashCode = value
136142 override def toString = value.toString
137143 }
138144
@@ -184,6 +190,12 @@ quant)
184190 if (this .specificNanos < that.specificNanos) - 1
185191 else if (this .specificNanos > that.specificNanos) 1
186192 else 0
193+ override def equals (that : Any ): Boolean =
194+ that match {
195+ case that : StackableTimer => (this compare that) == 0
196+ case _ => false
197+ }
198+ override def hashCode = specificNanos.##
187199 override def toString = s " ${super .toString} aggregate, ${show(specificNanos)} specific "
188200 }
189201
You can’t perform that action at this time.
0 commit comments