We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4fe9fdc + 8ec12f6 commit 8d119e6Copy full SHA for 8d119e6
src/repl/scala/tools/nsc/interpreter/Pasted.scala
@@ -21,7 +21,13 @@ abstract class Pasted {
21
def PromptString: String
22
def AltPromptString: String = "scala> "
23
24
- private val testBoth = PromptString != AltPromptString
+ /* `testBoth` cannot be a val, as `Pasted` is inherited by `object paste` in ILoop,
25
+ which would cause `val testBoth` to be initialized before `val PromptString` was.
26
+
27
+ object paste extends Pasted {
28
+ val PromptString = prompt.lines.toList.last
29
+ */
30
+ private def testBoth = PromptString != AltPromptString
31
private val spacey = " \t".toSet
32
33
def matchesPrompt(line: String) = matchesString(line, PromptString) || testBoth && matchesString(line, AltPromptString)
0 commit comments