SetSpec's val set has a type of Set[E, S]; what I would like to see is something more like SES <: Set[E, S] — but this breaks compilation somehow.
The offending code is:
object RedBlackSetSpec {
val set = new RedBlackSet[Int]
}
class RedBlackSetSpec
extends SetSpec(RedBlackSetSpec.set)
with IntElements {
val set = RedBlackSetSpec.set
// ...
}
the ideal code would be something along the lines of,
class RedBlackSetSpec
extends SetSpec(new RedBlackSet[Int])
with IntElements {
// ...
}
SetSpec
'sval set
has a type ofSet[E, S]
; what I would like to see is something more likeSES <: Set[E, S]
— but this breaks compilation somehow.The offending code is:
the ideal code would be something along the lines of,