File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
shared/src/main/scala/scala/xml Expand file tree Collapse file tree 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
2222 */
2323// Note: used by the Scala compiler.
2424final 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`.
2529 override def theSeq : ScalaVersionSpecific .SeqOfNode = nodes.toSeq
2630
2731 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
2626object NodeSeq {
2727 final val Empty : NodeSeq = fromSeq(Nil )
2828 def fromSeq (s : Seq [Node ]): NodeSeq = new NodeSeq {
29- override def theSeq : ScalaVersionSpecific .SeqOfNode = s match {
29+ override val theSeq : ScalaVersionSpecific .SeqOfNode = s match {
3030 case ns : ScalaVersionSpecific .SeqOfNode => ns
3131 case _ => s.toVector
3232 }
You can’t perform that action at this time.
0 commit comments