summaryrefslogtreecommitdiff
path: root/test/files/neg/t5856.check
diff options
context:
space:
mode:
authorDominik Gruntz <dominik.gruntz@fhnw.ch>2012-07-17 15:38:58 +0200
committerDominik Gruntz <dominik.gruntz@fhnw.ch>2012-07-17 15:48:37 +0200
commit9c4b0d0402559921d4f36e9ebdd1af9a818fdde7 (patch)
treeba04a2af0e0c83b3a278e69d8efa9389f9031f99 /test/files/neg/t5856.check
parentbad93927836f302be3b973335a63bb5e69b2237c (diff)
downloadscala-9c4b0d0402559921d4f36e9ebdd1af9a818fdde7.tar.gz
scala-9c4b0d0402559921d4f36e9ebdd1af9a818fdde7.tar.bz2
scala-9c4b0d0402559921d4f36e9ebdd1af9a818fdde7.zip
SI-5856 enables use of $this in string interpolation
This pull request fixes SI-5856. The scanner has been modified to return the correct token if keywords appear in $-expressions. The parser has been modified to issue an error and to only accept $<identifier>, $this and $block.
Diffstat (limited to 'test/files/neg/t5856.check')
-rw-r--r--test/files/neg/t5856.check31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/files/neg/t5856.check b/test/files/neg/t5856.check
new file mode 100644
index 0000000000..d42bcdb524
--- /dev/null
+++ b/test/files/neg/t5856.check
@@ -0,0 +1,31 @@
+t5856.scala:10: error: invalid string interpolation: $$, $ident or $block expected
+ val s9 = s"$"
+ ^
+t5856.scala:10: error: unclosed string literal
+ val s9 = s"$"
+ ^
+t5856.scala:2: error: error in interpolated string: identifier or block expected
+ val s1 = s"$null"
+ ^
+t5856.scala:3: error: error in interpolated string: identifier or block expected
+ val s2 = s"$false"
+ ^
+t5856.scala:4: error: error in interpolated string: identifier or block expected
+ val s3 = s"$true"
+ ^
+t5856.scala:5: error: error in interpolated string: identifier or block expected
+ val s4 = s"$yield"
+ ^
+t5856.scala:6: error: error in interpolated string: identifier or block expected
+ val s5 = s"$return"
+ ^
+t5856.scala:7: error: error in interpolated string: identifier or block expected
+ val s6 = s"$new"
+ ^
+t5856.scala:8: error: error in interpolated string: identifier or block expected
+ val s7 = s"$s1 $null $super"
+ ^
+t5856.scala:9: error: error in interpolated string: identifier or block expected
+ val s8 = s"$super"
+ ^
+10 errors found