File tree Expand file tree Collapse file tree 6 files changed +9
-7
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 6 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ class PathResolver(using c: Context) {
205205 import classPathFactory ._
206206
207207 // Assemble the elements!
208- def basis : List [Traversable [ClassPath ]] =
208+ def basis : List [Iterable [ClassPath ]] =
209209 val release = Option (ctx.settings.release.value).filter(_.nonEmpty)
210210
211211 List (
Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ object SymDenotations {
275275 }
276276
277277 /** Add all given annotations to this symbol */
278- final def addAnnotations (annots : TraversableOnce [Annotation ])(using Context ): Unit =
278+ final def addAnnotations (annots : IterableOnce [Annotation ])(using Context ): Unit =
279279 annots.iterator.foreach(addAnnotation)
280280
281281 @ tailrec
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ package xml
1111
1212import Utility ._
1313import util .Chars .SU
14+ import scala .collection .BufferedIterator
1415
1516
1617
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ package parsing
44package xml
55
66import scala .collection .mutable
7+ import scala .collection .BufferedIterator
78import mutable .{ Buffer , ArrayBuffer , ListBuffer }
89import scala .util .control .ControlThrowable
910import util .Chars .SU
Original file line number Diff line number Diff line change @@ -169,15 +169,15 @@ abstract class Printer {
169169 atPrec(GlobalPrec ) { elem.toText(this ) }
170170
171171 /** Render elements alternating with `sep` string */
172- def toText (elems : Traversable [Showable ], sep : String ): Text =
172+ def toText (elems : Iterable [Showable ], sep : String ): Text =
173173 Text (elems map (_ toText this ), sep)
174174
175175 /** Render elements within highest precedence */
176- def toTextLocal (elems : Traversable [Showable ], sep : String ): Text =
176+ def toTextLocal (elems : Iterable [Showable ], sep : String ): Text =
177177 atPrec(DotPrec ) { toText(elems, sep) }
178178
179179 /** Render elements within lowest precedence */
180- def toTextGlobal (elems : Traversable [Showable ], sep : String ): Text =
180+ def toTextGlobal (elems : Iterable [Showable ], sep : String ): Text =
181181 atPrec(GlobalPrec ) { toText(elems, sep) }
182182
183183 /** A plain printer without any embellishments */
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ object Texts {
158158 /** A concatenation of elements in `xs` and interspersed with
159159 * separator strings `sep`.
160160 */
161- def apply (xs : Traversable [Text ], sep : String = " " ): Text =
161+ def apply (xs : Iterable [Text ], sep : String = " " ): Text =
162162 if (sep == " \n " ) lines(xs)
163163 else {
164164 val ys = xs filterNot (_.isEmpty)
@@ -167,7 +167,7 @@ object Texts {
167167 }
168168
169169 /** The given texts `xs`, each on a separate line */
170- def lines (xs : Traversable [Text ]): Vertical = Vertical (xs.toList.reverse)
170+ def lines (xs : Iterable [Text ]): Vertical = Vertical (xs.toList.reverse)
171171
172172 extension (text : => Text )
173173 def provided (cond : Boolean ): Text = if (cond) text else Str (" " )
You can’t perform that action at this time.
0 commit comments