File tree 2 files changed +5
-1
lines changed
shared/src/main/scala/scala/xml 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ import scala.collection.Seq
22
22
*/
23
23
// Note: used by the Scala compiler.
24
24
final case class Group (nodes : Seq [Node ]) extends Node {
25
+ // Ideally, the `immutable.Seq` would be stored as a field.
26
+ // But evolving the case class and remaining binary compatible is very difficult
27
+ // Since `Group` is used rarely, call `toSeq` on the field.
28
+ // In practice, it should not matter - the `nodes` field anyway contains an `immutable.Seq`.
25
29
override def theSeq : ScalaVersionSpecific .SeqOfNode = nodes.toSeq
26
30
27
31
override def canEqual (other : Any ): Boolean = other match {
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import scala.collection.Seq
26
26
object NodeSeq {
27
27
final val Empty : NodeSeq = fromSeq(Nil )
28
28
def fromSeq (s : Seq [Node ]): NodeSeq = new NodeSeq {
29
- override def theSeq : ScalaVersionSpecific .SeqOfNode = s match {
29
+ override val theSeq : ScalaVersionSpecific .SeqOfNode = s match {
30
30
case ns : ScalaVersionSpecific .SeqOfNode => ns
31
31
case _ => s.toVector
32
32
}
You can’t perform that action at this time.
0 commit comments