File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,10 @@ package internal {
191
191
*/
192
192
final class TastyTreeExpr [Tree ](val tree : Tree , val scopeId : Int ) extends Expr [Any ] {
193
193
override def equals (that : Any ): Boolean = that match {
194
- case that : TastyTreeExpr [_] => tree == that.tree && scopeId == that.scopeId
194
+ case that : TastyTreeExpr [_] =>
195
+ // TastyTreeExpr are wrappers around trees, therfore they are equals if their trees are equal.
196
+ // All scopeId should be equal unless two different runs of the compiler created the trees.
197
+ tree == that.tree && scopeId == that.scopeId
195
198
case _ => false
196
199
}
197
200
override def hashCode : Int = tree.hashCode
Original file line number Diff line number Diff line change @@ -72,7 +72,10 @@ package internal {
72
72
/** An Type backed by a tree */
73
73
final class TreeType [Tree ](val typeTree : Tree , val scopeId : Int ) extends scala.quoted.Type [Any ] {
74
74
override def equals (that : Any ): Boolean = that match {
75
- case that : TreeType [_] => typeTree == that.typeTree && scopeId == that.scopeId
75
+ case that : TreeType [_] => typeTree ==
76
+ // TastyTreeExpr are wrappers around trees, therfore they are equals if their trees are equal.
77
+ // All scopeId should be equal unless two different runs of the compiler created the trees.
78
+ that.typeTree && scopeId == that.scopeId
76
79
case _ => false
77
80
}
78
81
override def hashCode : Int = typeTree.hashCode
You can’t perform that action at this time.
0 commit comments