From 33e5c85aec852205e7b96f2a3cb43745c53f8012 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Fri, 18 May 2018 22:03:54 +0200 Subject: [PATCH] Make ScalaVersionSpecific non-public --- .../scala-2.11-2.12/scala/xml/ScalaVersionSpecific.scala | 6 +++--- .../main/scala-2.13/scala/xml/ScalaVersionSpecific.scala | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/shared/src/main/scala-2.11-2.12/scala/xml/ScalaVersionSpecific.scala b/shared/src/main/scala-2.11-2.12/scala/xml/ScalaVersionSpecific.scala index eee27f621..417a3bcc6 100644 --- a/shared/src/main/scala-2.11-2.12/scala/xml/ScalaVersionSpecific.scala +++ b/shared/src/main/scala-2.11-2.12/scala/xml/ScalaVersionSpecific.scala @@ -3,7 +3,7 @@ package scala.xml import scala.collection.SeqLike import scala.collection.generic.CanBuildFrom -object ScalaVersionSpecific { +private[xml] object ScalaVersionSpecific { import NodeSeq.Coll type CBF[-From, -A, +C] = CanBuildFrom[From, A, C] object NodeSeqCBF extends CanBuildFrom[Coll, Node, NodeSeq] { @@ -12,11 +12,11 @@ object ScalaVersionSpecific { } } -trait ScalaVersionSpecificNodeSeq extends SeqLike[Node, NodeSeq] { self: NodeSeq => +private[xml] trait ScalaVersionSpecificNodeSeq extends SeqLike[Node, NodeSeq] { self: NodeSeq => /** Creates a list buffer as builder for this class */ override protected[this] def newBuilder = NodeSeq.newBuilder } -trait ScalaVersionSpecificNodeBuffer { self: NodeBuffer => +private[xml] trait ScalaVersionSpecificNodeBuffer { self: NodeBuffer => override def stringPrefix: String = "NodeBuffer" } diff --git a/shared/src/main/scala-2.13/scala/xml/ScalaVersionSpecific.scala b/shared/src/main/scala-2.13/scala/xml/ScalaVersionSpecific.scala index 6b66691c5..fb256ba60 100644 --- a/shared/src/main/scala-2.13/scala/xml/ScalaVersionSpecific.scala +++ b/shared/src/main/scala-2.13/scala/xml/ScalaVersionSpecific.scala @@ -5,7 +5,7 @@ import scala.collection.{SeqOps, immutable, mutable} import scala.collection.BuildFrom import scala.collection.mutable.Builder -object ScalaVersionSpecific { +private[xml] object ScalaVersionSpecific { import NodeSeq.Coll type CBF[-From, -A, +C] = BuildFrom[From, A, C] object NodeSeqCBF extends BuildFrom[Coll, Node, NodeSeq] { @@ -14,14 +14,13 @@ object ScalaVersionSpecific { } } -trait ScalaVersionSpecificNodeSeq +private[xml] trait ScalaVersionSpecificNodeSeq extends SeqOps[Node, immutable.Seq, NodeSeq] with StrictOptimizedSeqOps[Node, immutable.Seq, NodeSeq] { self: NodeSeq => override def fromSpecificIterable(coll: Iterable[Node]): NodeSeq = (NodeSeq.newBuilder ++= coll).result() - - override def newSpecificBuilder(): mutable.Builder[Node, NodeSeq] = NodeSeq.newBuilder + override def newSpecificBuilder: mutable.Builder[Node, NodeSeq] = NodeSeq.newBuilder } -trait ScalaVersionSpecificNodeBuffer { self: NodeBuffer => +private[xml] trait ScalaVersionSpecificNodeBuffer { self: NodeBuffer => override def className: String = "NodeBuffer" }