diff --git a/library/src/scala/io/Source.scala b/library/src/scala/io/Source.scala index 35de2a30b06d..b372fc75db9e 100644 --- a/library/src/scala/io/Source.scala +++ b/library/src/scala/io/Source.scala @@ -317,7 +317,7 @@ abstract class Source extends Iterator[Char] with Closeable { report(pos, msg, out) } - private def spaces(n: Int) = List.fill(n)(' ').mkString + private def spaces(n: Int) = " ".repeat(n) /** * @param pos the source position (line/column) * @param msg the error message to report