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 {
191191 */
192192 final class TastyTreeExpr [Tree ](val tree : Tree , val scopeId : Int ) extends Expr [Any ] {
193193 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
195198 case _ => false
196199 }
197200 override def hashCode : Int = tree.hashCode
Original file line number Diff line number Diff line change @@ -72,7 +72,10 @@ package internal {
7272 /** An Type backed by a tree */
7373 final class TreeType [Tree ](val typeTree : Tree , val scopeId : Int ) extends scala.quoted.Type [Any ] {
7474 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
7679 case _ => false
7780 }
7881 override def hashCode : Int = typeTree.hashCode
You can’t perform that action at this time.
0 commit comments