From 05cc3e2271d2c2226ded33bef5a03f0c70c6f66d Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Mon, 16 Jan 2017 22:21:14 -0800 Subject: SI-10120 ReplReporter handles message indent Instead of indenting source code to make messages align on output, let the reporter add indentation, only if the source is the console (and not a pastie or a loaded file). Previously, syntax errors were not indented. ``` $ skala Welcome to Scala 2.12.2-20170108-010722-939abf1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111). Type in expressions for evaluation. Or try :help. scala> 'abc' :1: error: unclosed character literal (or use " for string literal "abc") 'abc' ^ scala> :quit $ scala Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111). Type in expressions for evaluation. Or try :help. scala> 'abc' :1: error: unclosed character literal 'abc' ^ ``` --- test/files/run/repl-colon-type.check | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/files/run/repl-colon-type.check') diff --git a/test/files/run/repl-colon-type.check b/test/files/run/repl-colon-type.check index 1217e8d8c2..0fa5695155 100644 --- a/test/files/run/repl-colon-type.check +++ b/test/files/run/repl-colon-type.check @@ -1,8 +1,8 @@ scala> :type List[1, 2, 3] :1: error: identifier expected but integer literal found. -List[1, 2, 3] - ^ + List[1, 2, 3] + ^ scala> :type List(1, 2, 3) List[Int] @@ -38,8 +38,8 @@ scala> :type protected lazy val f = 5 Access to protected lazy value f not permitted because enclosing object $eval in package $line13 is not a subclass of object $iw where target is defined - lazy val $result = f - ^ + lazy val $result = f + ^ scala> :type def f = 5 => Int -- cgit v1.2.3