Skip to content

Commit c4766d6

Browse files
committed
Remove references to deprecated classes
`scala.{Traversable,TraversableOnce,BufferedIterator}` are deprecated since 2.13.0. It seems these deprecated references where not found when the check was performed after `FirstTransform` as the types might have been dealiased in the `TypeTree`.
1 parent 46df5a2 commit c4766d6

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

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

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

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

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

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

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

1212
import Utility._
1313
import 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.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package xml
66
import scala.language.unsafeNulls
77

88
import scala.collection.mutable
9+
import scala.collection.BufferedIterator
910
import core.Contexts.Context
1011
import mutable.{ Buffer, ArrayBuffer, ListBuffer }
1112
import scala.util.control.ControlThrowable

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

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

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

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

0 commit comments

Comments
 (0)