File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,14 @@ object WrapFnGen {
58
58
}
59
59
60
60
implicit class SplitMyLinesAndStuff (s : String ) {
61
- def toVec = s.linesIterator.toVector
61
+ // work around scala/bug#11125
62
+ def toVec = Predef .augmentString(s).lines.toVector
62
63
def nonBlank = s.trim.length > 0
63
64
}
64
65
65
66
implicit class TreeToText (t : Tree ) {
66
- def text = showCode(t).replace(" $" , " " ).linesIterator.toVector
67
+ // work around scala/bug#11125
68
+ def text = Predef .augmentString(showCode(t).replace(" $" , " " )).lines.toVector
67
69
}
68
70
69
71
case class Prioritized (lines : Vector [String ], priority : Int ) {
@@ -288,7 +290,8 @@ object WrapFnGen {
288
290
def sameText (f : java.io.File , text : String ): Boolean = {
289
291
val x = scala.io.Source .fromFile(f)
290
292
val lines = try { x.getLines.toVector } finally { x.close }
291
- lines.iterator.filter(_.nonBlank) == text.linesIterator.filter(_.nonBlank)
293
+ // work around scala/bug#11125
294
+ lines.iterator.filter(_.nonBlank) == Predef .augmentString(text).lines.filter(_.nonBlank)
292
295
}
293
296
294
297
def write (f : java.io.File , text : String ): Unit = {
You can’t perform that action at this time.
0 commit comments