File tree Expand file tree Collapse file tree 6 files changed +9
-9
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ class PathResolver(using c: Context) {
211211 import classPathFactory ._
212212
213213 // Assemble the elements!
214- def basis : List [Traversable [ClassPath ]] =
214+ def basis : List [Iterable [ClassPath ]] =
215215 val release = Option (ctx.settings.javaOutputVersion.value).filter(_.nonEmpty)
216216
217217 List (
Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ object SymDenotations {
299299 }
300300
301301 /** Add all given annotations to this symbol */
302- final def addAnnotations (annots : TraversableOnce [Annotation ])(using Context ): Unit =
302+ final def addAnnotations (annots : IterableOnce [Annotation ])(using Context ): Unit =
303303 annots.iterator.foreach(addAnnotation)
304304
305305 @ tailrec
Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ package xml
1111
1212import Utility ._
1313import util .Chars .SU
14-
15-
14+ import scala .collection .BufferedIterator
1615
1716/** This is not a public trait - it contains common code shared
1817 * between the library level XML parser and the compiler's.
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ package xml
66import scala .language .unsafeNulls
77
88import scala .collection .mutable
9+ import scala .collection .BufferedIterator
910import core .Contexts .Context
1011import mutable .{ Buffer , ArrayBuffer , ListBuffer }
1112import scala .util .control .ControlThrowable
Original file line number Diff line number Diff line change @@ -174,15 +174,15 @@ abstract class Printer {
174174 atPrec(GlobalPrec ) { elem.toText(this ) }
175175
176176 /** Render elements alternating with `sep` string */
177- def toText (elems : Traversable [Showable ], sep : String ): Text =
177+ def toText (elems : Iterable [Showable ], sep : String ): Text =
178178 Text (elems map (_ toText this ), sep)
179179
180180 /** Render elements within highest precedence */
181- def toTextLocal (elems : Traversable [Showable ], sep : String ): Text =
181+ def toTextLocal (elems : Iterable [Showable ], sep : String ): Text =
182182 atPrec(DotPrec ) { toText(elems, sep) }
183183
184184 /** Render elements within lowest precedence */
185- def toTextGlobal (elems : Traversable [Showable ], sep : String ): Text =
185+ def toTextGlobal (elems : Iterable [Showable ], sep : String ): Text =
186186 atPrec(GlobalPrec ) { toText(elems, sep) }
187187
188188 /** A plain printer without any embellishments */
Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ object Texts {
173173 /** A concatenation of elements in `xs` and interspersed with
174174 * separator strings `sep`.
175175 */
176- def apply (xs : Traversable [Text ], sep : String = " " ): Text =
176+ def apply (xs : Iterable [Text ], sep : String = " " ): Text =
177177 if (sep == " \n " ) lines(xs)
178178 else {
179179 val ys = xs.filterNot(_.isEmpty)
@@ -182,7 +182,7 @@ object Texts {
182182 }
183183
184184 /** The given texts `xs`, each on a separate line */
185- def lines (xs : Traversable [Text ]): Vertical = Vertical (xs.toList.reverse)
185+ def lines (xs : Iterable [Text ]): Vertical = Vertical (xs.toList.reverse)
186186
187187 extension (text : => Text )
188188 def provided (cond : Boolean ): Text = if (cond) text else Str (" " )
You can’t perform that action at this time.
0 commit comments