You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ scala
Welcome to Scala 2.12.4 (Java HotSpot(TM) 64-Bit Server VM, Java 11-ea).
Type in expressions for evaluation. Or try :help.
scala> "".lines.toList
<console>:12: error: value toList is not a member of java.util.stream.Stream[String]
"".lines.toList
^
scala> augmentString("").lines.toList
res1: List[String] = List()
scala> ("": collection.immutable.StringOps).lines.toList
res2: List[String] = List()
scala> "".linesIterator.toList
<console>:12: warning: method linesIterator in trait StringLike is deprecated (since 2.11.0): use `lines` instead
"".linesIterator.toList
^
res3: List[String] = List()
I propose that we undeprecate linesIterator in 2.12, and restore it to 2.13 (where it was already removed).
The text was updated successfully, but these errors were encountered:
Java 11 introduced a `lines` method to the String class, which
has precedence over the `lines` extension method added by StringOps.
As a result, the code using that method was failing to compile.
This PR repairs that by using `linesIterator` instead.
See scala/scala-dev#557 for details.
I propose that we undeprecate
linesIterator
in 2.12, and restore it to 2.13 (where it was already removed).The text was updated successfully, but these errors were encountered: