diff options
author | Paul Phillips <paulp@improving.org> | 2010-12-11 15:31:23 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-12-11 15:31:23 +0000 |
commit | 933148f71e1254089d036b2428a1c51cb2816c56 (patch) | |
tree | 0d5cb5db6d771464756975a493c54e63f41dfeaa /test | |
parent | 262ee3a852f278f97b083a05376de0eab96c805d (diff) | |
download | scala-933148f71e1254089d036b2428a1c51cb2816c56.tar.gz scala-933148f71e1254089d036b2428a1c51cb2816c56.tar.bz2 scala-933148f71e1254089d036b2428a1c51cb2816c56.zip |
Turned an assert/compiler crash into an error m...
Turned an assert/compiler crash into an error message. Admittedly the
error output is still terrible (the XML positioning looks like it came
from an RNG) but more helpful than the crash. Also misc advantage of a
handy new method. Closes #4069, no review.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/bug4069.check | 16 | ||||
-rw-r--r-- | test/files/neg/bug4069.scala | 10 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/files/neg/bug4069.check b/test/files/neg/bug4069.check new file mode 100644 index 0000000000..d3aa8f3992 --- /dev/null +++ b/test/files/neg/bug4069.check @@ -0,0 +1,16 @@ +bug4069.scala:7: error: unexpected end of input: possible missing '}' in XML block + case 2 => + ^ +bug4069.scala:6: error: Missing closing brace `}' assumed here + </div> + ^ +bug4069.scala:9: error: in XML literal: in XML content, please use '}}' to express '}' + } + ^ +bug4069.scala:4: error: I encountered a '}' where I didn't expect one, maybe this tag isn't closed <div> + <div> + ^ +bug4069.scala:10: error: '}' expected but eof found. +} +^ +5 errors found diff --git a/test/files/neg/bug4069.scala b/test/files/neg/bug4069.scala new file mode 100644 index 0000000000..80df6ec16d --- /dev/null +++ b/test/files/neg/bug4069.scala @@ -0,0 +1,10 @@ +object ParserBug { + 1 match { + case 1 => + <div> + { 1 match { case 1 => "1"; case 2 => "2" } + </div> + case 2 => + <div/> + } +}
\ No newline at end of file |