8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 409b280 + 5c296a4 commit 3fafbc2Copy full SHA for 3fafbc2
src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
@@ -122,9 +122,20 @@ trait Logic extends Debugging {
122
123
// symbols are propositions
124
final class Sym private[PropositionalLogic] (val variable: Var, val const: Const) extends Prop {
125
+
126
+ override def equals(other: scala.Any): Boolean = other match {
127
+ case that: Sym => this.variable == that.variable &&
128
+ this.const == that.const
129
+ case _ => false
130
+ }
131
132
+ override def hashCode(): Int = {
133
+ variable.hashCode * 41 + const.hashCode
134
135
136
private val id: Int = Sym.nextSymId
137
- override def toString = variable + "=" + const + "#" + id
138
+ override def toString = s"$variable=$const#$id"
139
}
140
141
object Sym {
0 commit comments