summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan@lightbend.com>2017-02-21 11:57:05 -0800
committerGitHub <noreply@github.com>2017-02-21 11:57:05 -0800
commitd60f6e340766f8876adb21092081bf264c64597f (patch)
treec465fa15a9e1d6207c45107b318818aa84b6ea50 /test
parenta8c4a54d18c5560417d8c41db8b23a10fe8d616d (diff)
downloadscala-d60f6e340766f8876adb21092081bf264c64597f.tar.gz
scala-d60f6e340766f8876adb21092081bf264c64597f.tar.bz2
scala-d60f6e340766f8876adb21092081bf264c64597f.zip
Revert "SI-10133 Require escaped single quote char lit"
Diffstat (limited to 'test')
-rw-r--r--test/files/jvm/interpreter.check8
-rw-r--r--test/files/neg/badtok-1.check8
-rw-r--r--test/files/neg/badtok-1.scala7
-rw-r--r--test/files/neg/t5856.check2
-rw-r--r--test/files/run/reify_newimpl_22.check2
-rw-r--r--test/files/run/reify_newimpl_23.check2
-rw-r--r--test/files/run/reify_newimpl_25.check2
-rw-r--r--test/files/run/reify_newimpl_26.check2
-rw-r--r--test/files/run/repl-colon-type.check8
-rw-r--r--test/files/run/t8918-unary-ids.check14
-rw-r--r--test/files/run/t9170.scala4
-rw-r--r--test/junit/scala/tools/nsc/interpreter/ScriptedTest.scala2
12 files changed, 17 insertions, 44 deletions
diff --git a/test/files/jvm/interpreter.check b/test/files/jvm/interpreter.check
index 6b712b93c7..72d8d39fd0 100644
--- a/test/files/jvm/interpreter.check
+++ b/test/files/jvm/interpreter.check
@@ -278,13 +278,13 @@ scala> // both of the following should abort immediately:
scala> def x => y => z
<console>:1: error: '=' expected but '=>' found.
- def x => y => z
- ^
+def x => y => z
+ ^
scala> [1,2,3]
<console>:1: error: illegal start of definition
- [1,2,3]
- ^
+[1,2,3]
+^
scala>
diff --git a/test/files/neg/badtok-1.check b/test/files/neg/badtok-1.check
index 5d5a8e1f35..b05bc60161 100644
--- a/test/files/neg/badtok-1.check
+++ b/test/files/neg/badtok-1.check
@@ -4,10 +4,4 @@ badtok-1.scala:2: error: unclosed character literal
badtok-1.scala:2: error: unclosed character literal
'42'
^
-badtok-1.scala:6: error: empty character literal (use '\'' for single quote)
-'''
-^
-badtok-1.scala:9: error: unclosed character literal (or use " for string literal "abc")
-'abc'
- ^
-four errors found
+two errors found
diff --git a/test/files/neg/badtok-1.scala b/test/files/neg/badtok-1.scala
index cc7dc6cecc..706e794946 100644
--- a/test/files/neg/badtok-1.scala
+++ b/test/files/neg/badtok-1.scala
@@ -1,9 +1,2 @@
// bug 989
'42'
-
-
-// SI-10133
-'''
-
-// SI-10120
-'abc'
diff --git a/test/files/neg/t5856.check b/test/files/neg/t5856.check
index 306cc04177..08a61bdc07 100644
--- a/test/files/neg/t5856.check
+++ b/test/files/neg/t5856.check
@@ -1,4 +1,4 @@
-t5856.scala:10: error: invalid string interpolation $", expected: $$, $identifier or ${expression}
+t5856.scala:10: error: invalid string interpolation: `$$', `$'ident or `$'BlockExpr expected
val s9 = s"$"
^
t5856.scala:10: error: unclosed string literal
diff --git a/test/files/run/reify_newimpl_22.check b/test/files/run/reify_newimpl_22.check
index b2f4d5624e..985f646579 100644
--- a/test/files/run/reify_newimpl_22.check
+++ b/test/files/run/reify_newimpl_22.check
@@ -15,7 +15,7 @@ scala> {
}
println(code.eval)
}
-<console>:19: free term: Ident(TermName("x")) defined by res0 in <console>:18:7
+<console>:19: free term: Ident(TermName("x")) defined by res0 in <console>:18:14
val code = reify {
^
2
diff --git a/test/files/run/reify_newimpl_23.check b/test/files/run/reify_newimpl_23.check
index abf314b26a..f60113c69f 100644
--- a/test/files/run/reify_newimpl_23.check
+++ b/test/files/run/reify_newimpl_23.check
@@ -14,7 +14,7 @@ scala> def foo[T]{
}
println(code.eval)
}
-<console>:17: free type: Ident(TypeName("T")) defined by foo in <console>:16:9
+<console>:17: free type: Ident(TypeName("T")) defined by foo in <console>:16:16
val code = reify {
^
foo: [T]=> Unit
diff --git a/test/files/run/reify_newimpl_25.check b/test/files/run/reify_newimpl_25.check
index d446caa91a..9104d8df0b 100644
--- a/test/files/run/reify_newimpl_25.check
+++ b/test/files/run/reify_newimpl_25.check
@@ -5,7 +5,7 @@ scala> {
val tt = implicitly[TypeTag[x.type]]
println(tt)
}
-<console>:15: free term: Ident(TermName("x")) defined by res0 in <console>:14:7
+<console>:15: free term: Ident(TermName("x")) defined by res0 in <console>:14:14
val tt = implicitly[TypeTag[x.type]]
^
TypeTag[x.type]
diff --git a/test/files/run/reify_newimpl_26.check b/test/files/run/reify_newimpl_26.check
index 099231bf62..cbb21854ba 100644
--- a/test/files/run/reify_newimpl_26.check
+++ b/test/files/run/reify_newimpl_26.check
@@ -4,7 +4,7 @@ scala> def foo[T]{
val tt = implicitly[WeakTypeTag[List[T]]]
println(tt)
}
-<console>:13: free type: Ident(TypeName("T")) defined by foo in <console>:11:9
+<console>:13: free type: Ident(TypeName("T")) defined by foo in <console>:11:16
val tt = implicitly[WeakTypeTag[List[T]]]
^
foo: [T]=> Unit
diff --git a/test/files/run/repl-colon-type.check b/test/files/run/repl-colon-type.check
index 3fdd318df6..5b7a3c7506 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]
<console>: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
diff --git a/test/files/run/t8918-unary-ids.check b/test/files/run/t8918-unary-ids.check
index b1f16ed56a..92f02371c7 100644
--- a/test/files/run/t8918-unary-ids.check
+++ b/test/files/run/t8918-unary-ids.check
@@ -5,17 +5,3 @@ Expected 41 lines, got 39
-Type in expressions to have them evaluated.
-Type :help for more information.
-@@ -14,4 +12,4 @@
- <console>:1: error: illegal start of simple expression
--- if (true) 1 else 2
-- ^
-+ - if (true) 1 else 2
-+ ^
-
-@@ -19,4 +17,4 @@
- <console>:1: error: ';' expected but integer literal found.
--- - 1
-- ^
-+ - - 1
-+ ^
-
diff --git a/test/files/run/t9170.scala b/test/files/run/t9170.scala
index cb7971235f..87471fb129 100644
--- a/test/files/run/t9170.scala
+++ b/test/files/run/t9170.scala
@@ -48,8 +48,8 @@ object Y {
def f[A](a: => A): Int at line 12 and
def f[A](a: => Either[Exception,A]): Int at line 13
have same type after erasure: (a: Function0)Int
- def f[A](a: => Either[Exception, A]) = 2
- ^
+ def f[A](a: => Either[Exception, A]) = 2
+ ^
scala> :quit"""
}
diff --git a/test/junit/scala/tools/nsc/interpreter/ScriptedTest.scala b/test/junit/scala/tools/nsc/interpreter/ScriptedTest.scala
index e9f1336623..01d17110d6 100644
--- a/test/junit/scala/tools/nsc/interpreter/ScriptedTest.scala
+++ b/test/junit/scala/tools/nsc/interpreter/ScriptedTest.scala
@@ -96,7 +96,7 @@ class ScriptedTest {
}
@Test def `on compile error`(): Unit = {
val engine = scripted
- val err = "not found: value foo in def f = foo at line number 11 at column number 9"
+ val err = "not found: value foo in def f = foo at line number 11 at column number 16"
assertThrows[ScriptException](engine.compile("def f = foo"), _ == err)
}
}