File tree 6 files changed +9
-9
lines changed
compiler/src/dotty/tools/dotc
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) {
211
211
import classPathFactory ._
212
212
213
213
// Assemble the elements!
214
- def basis : List [Traversable [ClassPath ]] =
214
+ def basis : List [Iterable [ClassPath ]] =
215
215
val release = Option (ctx.settings.javaOutputVersion.value).filter(_.nonEmpty)
216
216
217
217
List (
Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ object SymDenotations {
299
299
}
300
300
301
301
/** 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 =
303
303
annots.iterator.foreach(addAnnotation)
304
304
305
305
@ tailrec
Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ package xml
11
11
12
12
import Utility ._
13
13
import util .Chars .SU
14
-
15
-
14
+ import scala .collection .BufferedIterator
16
15
17
16
/** This is not a public trait - it contains common code shared
18
17
* 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
6
6
import scala .language .unsafeNulls
7
7
8
8
import scala .collection .mutable
9
+ import scala .collection .BufferedIterator
9
10
import core .Contexts .Context
10
11
import mutable .{ Buffer , ArrayBuffer , ListBuffer }
11
12
import scala .util .control .ControlThrowable
Original file line number Diff line number Diff line change @@ -174,15 +174,15 @@ abstract class Printer {
174
174
atPrec(GlobalPrec ) { elem.toText(this ) }
175
175
176
176
/** Render elements alternating with `sep` string */
177
- def toText (elems : Traversable [Showable ], sep : String ): Text =
177
+ def toText (elems : Iterable [Showable ], sep : String ): Text =
178
178
Text (elems map (_ toText this ), sep)
179
179
180
180
/** Render elements within highest precedence */
181
- def toTextLocal (elems : Traversable [Showable ], sep : String ): Text =
181
+ def toTextLocal (elems : Iterable [Showable ], sep : String ): Text =
182
182
atPrec(DotPrec ) { toText(elems, sep) }
183
183
184
184
/** Render elements within lowest precedence */
185
- def toTextGlobal (elems : Traversable [Showable ], sep : String ): Text =
185
+ def toTextGlobal (elems : Iterable [Showable ], sep : String ): Text =
186
186
atPrec(GlobalPrec ) { toText(elems, sep) }
187
187
188
188
/** A plain printer without any embellishments */
Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ object Texts {
173
173
/** A concatenation of elements in `xs` and interspersed with
174
174
* separator strings `sep`.
175
175
*/
176
- def apply (xs : Traversable [Text ], sep : String = " " ): Text =
176
+ def apply (xs : Iterable [Text ], sep : String = " " ): Text =
177
177
if (sep == " \n " ) lines(xs)
178
178
else {
179
179
val ys = xs.filterNot(_.isEmpty)
@@ -182,7 +182,7 @@ object Texts {
182
182
}
183
183
184
184
/** 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)
186
186
187
187
extension (text : => Text )
188
188
def provided (cond : Boolean ): Text = if (cond) text else Str (" " )
You can’t perform that action at this time.
0 commit comments