@@ -17,6 +17,7 @@ import scala.util.hashing.MurmurHash3
17
17
import java .lang .String
18
18
19
19
import scala .annotation .nowarn
20
+ import language .experimental .captureChecking
20
21
21
22
/** Base trait for set collections.
22
23
*/
@@ -25,6 +26,7 @@ trait Set[A]
25
26
with SetOps [A , Set , Set [A ]]
26
27
with Equals
27
28
with IterableFactoryDefaults [A , Set ] {
29
+ self : Set [A ] =>
28
30
29
31
def canEqual (that : Any ) = true
30
32
@@ -86,8 +88,7 @@ trait Set[A]
86
88
* @define Coll `Set`
87
89
*/
88
90
trait SetOps [A , + CC [_], + C <: SetOps [A , CC , C ]]
89
- extends IterableOps [A , CC , C ]
90
- with (A => Boolean ) {
91
+ extends IterableOps [A , CC , C ], (A -> Boolean ) { self =>
91
92
92
93
def contains (elem : A ): Boolean
93
94
@@ -234,7 +235,7 @@ trait SetOps[A, +CC[_], +C <: SetOps[A, CC, C]]
234
235
case that : collection.Iterable [A ] => new View .Concat (this , that)
235
236
case _ => iterator.concat(that.iterator)
236
237
})
237
- }
238
+ }
238
239
239
240
@ deprecated(" Consider requiring an immutable Set or fall back to Set.union" , " 2.13.0" )
240
241
def + (elem : A ): C = fromSpecific(new View .Appended (this , elem))
0 commit comments