summaryrefslogtreecommitdiff
path: root/src/repl
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2016-05-24 08:21:56 +0200
committerSom Snytt <som.snytt@gmail.com>2016-05-24 04:48:33 -0700
commitb462e5a97b499bc91222014e45ec2439f56b46b7 (patch)
treeaf3e30974b40acf38bf18ac482531d233439c8c4 /src/repl
parent5450ae6102eaeb8ec0f9b524bf43ac5f604b5074 (diff)
downloadscala-b462e5a97b499bc91222014e45ec2439f56b46b7.tar.gz
scala-b462e5a97b499bc91222014e45ec2439f56b46b7.tar.bz2
scala-b462e5a97b499bc91222014e45ec2439f56b46b7.zip
SI-7898 Label for parsing -i sources
Text-based REPL pre-parses, so use the current label for errors.
Diffstat (limited to 'src/repl')
-rw-r--r--src/repl/scala/tools/nsc/interpreter/IMain.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/repl/scala/tools/nsc/interpreter/IMain.scala b/src/repl/scala/tools/nsc/interpreter/IMain.scala
index 1e7a9cefed..dc8b6204c0 100644
--- a/src/repl/scala/tools/nsc/interpreter/IMain.scala
+++ b/src/repl/scala/tools/nsc/interpreter/IMain.scala
@@ -1191,7 +1191,7 @@ class IMain(@BeanProperty val factory: ScriptEngineFactory, initialSettings: Set
var isIncomplete = false
def parse = {
reporter.reset()
- val trees = newUnitParser(line).parseStats()
+ val trees = newUnitParser(line, label).parseStats()
if (reporter.hasErrors) Error(trees)
else if (isIncomplete) Incomplete(trees)
else Success(trees)