From 1d55f7b0902b35d55d6d1dfc94ae8680e622c4da Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 1 Oct 2018 16:12:35 -0700 Subject: [PATCH] fix build problem on JDK 11 --- tests/src/test/scala/annotations/run/Repl.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/src/test/scala/annotations/run/Repl.scala b/tests/src/test/scala/annotations/run/Repl.scala index a17317a6..c2542221 100644 --- a/tests/src/test/scala/annotations/run/Repl.scala +++ b/tests/src/test/scala/annotations/run/Repl.scala @@ -16,7 +16,8 @@ class Repl extends FunSuite { s.usejavacp.value = false s.classpath.value = sys.props("sbt.paths.tests.classpath") s.plugin.value = List(sys.props("sbt.paths.plugin.jar")) - val lines = ILoop.runForTranscript(code, s).lines.toList + // Predef.augmentString = work around scala/bug#11125 on JDK 11 + val lines = Predef.augmentString(ILoop.runForTranscript(code, s)).lines.toList // TODO: I don't know why but setting replProps.colorOk to false doesn't help. // I don't have time to figure out what's going on, so I'll do simple string replacement. def cleanup(line: String) = line.replace(MAGENTA, "").replace(RESET, "").trim @@ -80,4 +81,4 @@ class Repl extends FunSuite { assert(!printout.contains("defined class NonThingy")) assert(!printout.contains("defined object NonThingy")) } -} \ No newline at end of file +}