diff options
author | Lex Spoon <lex@lexspoon.org> | 2007-06-03 12:25:37 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2007-06-03 12:25:37 +0000 |
commit | 724e68bab0d480fd9379afcbbb56ccc098770706 (patch) | |
tree | e43f183424ec9c02c261fb17a7dabdf18c84fea2 /test/files/run | |
parent | ae8da76c0141c0582577993ccfb24a3ad7f53d23 (diff) | |
download | scala-724e68bab0d480fd9379afcbbb56ccc098770706.tar.gz scala-724e68bab0d480fd9379afcbbb56ccc098770706.tar.bz2 scala-724e68bab0d480fd9379afcbbb56ccc098770706.zip |
The parser no longer signals "incomplete input"...
The parser no longer signals "incomplete input" in cases where the input
already has an outright syntax error.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/interpreter.check | 19 | ||||
-rw-r--r-- | test/files/run/interpreter.scala | 7 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/files/run/interpreter.check b/test/files/run/interpreter.check index be5e7c7dd9..90745ee56f 100644 --- a/test/files/run/interpreter.check +++ b/test/files/run/interpreter.check @@ -133,3 +133,22 @@ scala> two: Int = 2 scala> scala> +scala> +scala> +scala> <console>:1: error: '=' expected but '=>' found. +def x => y => z + ^ +<console>:1: error: illegal start of simple expression +def x => y => z + ^ + +scala> <console>:1: error: identifier expected but integer literal found. +[1,2,3] + ^ +<console>:1: error: ']' expected but eof found. +[1,2,3] + ^ + +scala> +scala> +scala> diff --git a/test/files/run/interpreter.scala b/test/files/run/interpreter.scala index 22dbf4754d..c59ce9f758 100644 --- a/test/files/run/interpreter.scala +++ b/test/files/run/interpreter.scala @@ -75,6 +75,13 @@ val x20 = 1 val two = one + x5 + +// interior syntax errors should *not* go into multi-line input mode. +// both of the following should abort immediately: +def x => y => z +[1,2,3] + + </code>.text |