summaryrefslogtreecommitdiff
path: root/test/files/neg/t2968.check
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-01-26 17:05:11 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-01-26 17:07:33 +0100
commit8350cd947290a9a8beb3ff643a1e3dd2342a9182 (patch)
tree4040d32d562422de5aff0246305f5c12c36f183d /test/files/neg/t2968.check
parent2fa859e1b3eb2ac57058feaba87d96adfbac9209 (diff)
downloadscala-8350cd947290a9a8beb3ff643a1e3dd2342a9182.tar.gz
scala-8350cd947290a9a8beb3ff643a1e3dd2342a9182.tar.bz2
scala-8350cd947290a9a8beb3ff643a1e3dd2342a9182.zip
[backport] SI-2968 Fix brace healing for `^case (class|object) {`
Squashed commit of the following: commit 24828531f62ce05402c96c04d7096e82d5f4e3bf Author: Jason Zaugg <jzaugg@gmail.com> Date: Sun Oct 21 23:34:35 2012 +0200 SI-2968 Fix brace healing for `^case (class|object) {` The scanner coalesces the pair of tokens into CASEOBJECT or CASECLASS, but fails to set `offset` back to the start of `case`. Brace healing is then unable to correctly guess the location of the missing brace. This commit resets `offset` and `lastOffset`, as though caseobject were a single keyword. Only the former was neccessary to fix this bug; I haven't found a test that shows the need for the latter. (cherry picked from commit cbad218dba47d49a39897b86d467c384538fdd53)
Diffstat (limited to 'test/files/neg/t2968.check')
-rw-r--r--test/files/neg/t2968.check10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/neg/t2968.check b/test/files/neg/t2968.check
new file mode 100644
index 0000000000..5d2387f98c
--- /dev/null
+++ b/test/files/neg/t2968.check
@@ -0,0 +1,10 @@
+t2968.scala:8: error: Missing closing brace `}' assumed here
+} // missing brace
+^
+t2968.scala:17: error: Missing closing brace `}' assumed here
+} // missing brace
+^
+t2968.scala:26: error: Missing closing brace `}' assumed here
+} // missing brace
+^
+three errors found