From 9c4b0d0402559921d4f36e9ebdd1af9a818fdde7 Mon Sep 17 00:00:00 2001 From: Dominik Gruntz Date: Tue, 17 Jul 2012 15:38:58 +0200 Subject: 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 $, $this and $block. --- test/files/run/t5856.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/files/run/t5856.scala (limited to 'test/files/run') diff --git a/test/files/run/t5856.scala b/test/files/run/t5856.scala new file mode 100644 index 0000000000..d1e9bd6e58 --- /dev/null +++ b/test/files/run/t5856.scala @@ -0,0 +1,10 @@ +object Test extends App { + override def toString = "Test" + + assert(s"$this" == "Test") + assert(s"$this$this" == "TestTest") + assert(s"$this$$" == "Test$") + assert(s"$this.##" == "Test.##") + assert(s"$this.toString" == "Test.toString") + assert(s"$this=THIS" == "Test=THIS") +} \ No newline at end of file -- cgit v1.2.3