File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
compiler/src/dotty/tools/dotc/util Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,13 @@ abstract class SimpleIdentitySet[+Elem <: AnyRef] {
1818 def ++ [E >: Elem <: AnyRef ](that : SimpleIdentitySet [E ]): SimpleIdentitySet [E ] =
1919 if (this .size == 0 ) that
2020 else if (that.size == 0 ) this
21- else concat( that)
21+ else (( this : SimpleIdentitySet [ E ]) /: that)(_ + _ )
2222 def -- [E >: Elem <: AnyRef ](that : SimpleIdentitySet [E ]): SimpleIdentitySet [E ] =
2323 if (that.size == 0 ) this
2424 else
2525 ((SimpleIdentitySet .empty: SimpleIdentitySet [E ]) /: this ) { (s, x) =>
2626 if (that.contains(x)) s else s + x
2727 }
28- protected def concat [E >: Elem <: AnyRef ](that : SimpleIdentitySet [E ]): SimpleIdentitySet [E ] =
29- ((this : SimpleIdentitySet [E ]) /: that)(_ + _)
3028 override def toString : String = toList.mkString(" (" , " , " , " )" )
3129}
3230
@@ -148,7 +146,7 @@ object SimpleIdentitySet {
148146 foreach(buf += _)
149147 buf.toList
150148 }
151- override def concat [E >: Elem <: AnyRef ](that : SimpleIdentitySet [E ]): SimpleIdentitySet [E ] =
149+ override def ++ [E >: Elem <: AnyRef ](that : SimpleIdentitySet [E ]): SimpleIdentitySet [E ] =
152150 that match {
153151 case that : SetN [_] =>
154152 var toAdd : mutable.ArrayBuffer [AnyRef ] = null
@@ -174,7 +172,7 @@ object SimpleIdentitySet {
174172 }
175173 new SetN [E ](xs1)
176174 }
177- case _ => super .concat (that)
175+ case _ => super .++ (that)
178176 }
179177 override def -- [E >: Elem <: AnyRef ](that : SimpleIdentitySet [E ]): SimpleIdentitySet [E ] =
180178 that match {
You can’t perform that action at this time.
0 commit comments