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 @@ -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 @@ -275,7 +275,7 @@ object SymDenotations {
275
275
}
276
276
277
277
/** 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 =
279
279
annots.iterator.foreach(addAnnotation)
280
280
281
281
@ tailrec
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ package xml
11
11
12
12
import Utility ._
13
13
import util .Chars .SU
14
+ import scala .collection .BufferedIterator
14
15
15
16
16
17
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 mutable .{ Buffer , ArrayBuffer , ListBuffer }
10
11
import scala .util .control .ControlThrowable
11
12
import util .Chars .SU
Original file line number Diff line number Diff line change @@ -169,15 +169,15 @@ abstract class Printer {
169
169
atPrec(GlobalPrec ) { elem.toText(this ) }
170
170
171
171
/** Render elements alternating with `sep` string */
172
- def toText (elems : Traversable [Showable ], sep : String ): Text =
172
+ def toText (elems : Iterable [Showable ], sep : String ): Text =
173
173
Text (elems map (_ toText this ), sep)
174
174
175
175
/** Render elements within highest precedence */
176
- def toTextLocal (elems : Traversable [Showable ], sep : String ): Text =
176
+ def toTextLocal (elems : Iterable [Showable ], sep : String ): Text =
177
177
atPrec(DotPrec ) { toText(elems, sep) }
178
178
179
179
/** Render elements within lowest precedence */
180
- def toTextGlobal (elems : Traversable [Showable ], sep : String ): Text =
180
+ def toTextGlobal (elems : Iterable [Showable ], sep : String ): Text =
181
181
atPrec(GlobalPrec ) { toText(elems, sep) }
182
182
183
183
/** A plain printer without any embellishments */
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ object Texts {
158
158
/** A concatenation of elements in `xs` and interspersed with
159
159
* separator strings `sep`.
160
160
*/
161
- def apply (xs : Traversable [Text ], sep : String = " " ): Text =
161
+ def apply (xs : Iterable [Text ], sep : String = " " ): Text =
162
162
if (sep == " \n " ) lines(xs)
163
163
else {
164
164
val ys = xs filterNot (_.isEmpty)
@@ -167,7 +167,7 @@ object Texts {
167
167
}
168
168
169
169
/** 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)
171
171
172
172
extension (text : => Text )
173
173
def provided (cond : Boolean ): Text = if (cond) text else Str (" " )
You can’t perform that action at this time.
0 commit comments