From b462e5a97b499bc91222014e45ec2439f56b46b7 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Tue, 24 May 2016 08:21:56 +0200 Subject: SI-7898 Label for parsing -i sources Text-based REPL pre-parses, so use the current label for errors. --- src/repl/scala/tools/nsc/interpreter/IMain.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/repl') 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) -- cgit v1.2.3