Skip to content

Commit fa95cbd

Browse files
committed
update usage of deprecated collections
1 parent 0e8587c commit fa95cbd

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

compiler/src/dotty/tools/dotc/config/PathResolver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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(

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

compiler/src/dotty/tools/dotc/parsing/xml/MarkupParserCommon.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ package xml
1111

1212
import Utility._
1313
import util.Chars.SU
14+
import scala.collection.BufferedIterator
1415

1516

1617

compiler/src/dotty/tools/dotc/parsing/xml/MarkupParsers.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package parsing
44
package xml
55

66
import scala.collection.mutable
7+
import scala.collection.BufferedIterator
78
import mutable.{ Buffer, ArrayBuffer, ListBuffer }
89
import scala.util.control.ControlThrowable
910
import util.Chars.SU

compiler/src/dotty/tools/dotc/printing/Printer.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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 */

compiler/src/dotty/tools/dotc/printing/Texts.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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("")

0 commit comments

Comments
 (0)