From 1e6c122c44af3d29f8c0f55e7bc3318a9d1b87a6 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 12 Dec 2010 19:26:54 +0000 Subject: Told the boy trying to plug the dike holes that... Told the boy trying to plug the dike holes that he can go home. Instead of trying to catch unpositioned EmptyTrees from the XML parser, don't generate them. It's the kind of commit you would tell your grandkids about if your grandkids could sit still for five seconds: fixes bugs by deleting code and eliminates extraneous error messages to boot (see .check diffs.) No review. --- test/files/neg/bug2275b.check | 5 +---- test/files/neg/t3769.check | 5 +---- test/files/neg/xmltruncated7.check | 7 +++++++ test/files/neg/xmltruncated7.scala | 3 +++ 4 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 test/files/neg/xmltruncated7.check create mode 100644 test/files/neg/xmltruncated7.scala (limited to 'test/files/neg') diff --git a/test/files/neg/bug2275b.check b/test/files/neg/bug2275b.check index 4b61f242d0..0db3eb8ff1 100644 --- a/test/files/neg/bug2275b.check +++ b/test/files/neg/bug2275b.check @@ -4,10 +4,7 @@ bug2275b.scala:2: error: in XML literal: in XML content, please use '}}' to expr bug2275b.scala:2: error: I encountered a '}' where I didn't expect one, maybe this tag isn't closed
{
}xx ^ -bug2275b.scala:2: error: ';' expected but identifier found. - {
}xx - ^ bug2275b.scala:3: error: '}' expected but eof found. } ^ -four errors found +three errors found diff --git a/test/files/neg/t3769.check b/test/files/neg/t3769.check index 7537ed2ddf..40ccf05ff3 100644 --- a/test/files/neg/t3769.check +++ b/test/files/neg/t3769.check @@ -4,7 +4,4 @@ t3769.scala:2: error: in XML literal: expected closing tag of a t3769.scala:2: error: start tag was here: a> val x = {"text"} ^ -t3769.scala:2: error: ';' expected but '{' found. - val x = {"text"} - ^ -three errors found +two errors found diff --git a/test/files/neg/xmltruncated7.check b/test/files/neg/xmltruncated7.check new file mode 100644 index 0000000000..67e7bd4b18 --- /dev/null +++ b/test/files/neg/xmltruncated7.check @@ -0,0 +1,7 @@ +xmltruncated7.scala:2: error: in XML literal: in XML content, please use '}}' to express '}' +

foo}:

+ ^ +xmltruncated7.scala:2: error: I encountered a '}' where I didn't expect one, maybe this tag isn't closed

+

foo}:

+ ^ +two errors found diff --git a/test/files/neg/xmltruncated7.scala b/test/files/neg/xmltruncated7.scala new file mode 100644 index 0000000000..7e296a910d --- /dev/null +++ b/test/files/neg/xmltruncated7.scala @@ -0,0 +1,3 @@ +object Test { +

foo}:

+} \ No newline at end of file -- cgit v1.2.3