From 017f48e00b863ecfc6a39c16c89a6ccb1dcde13d Mon Sep 17 00:00:00 2001 From: Dominik Gruntz Date: Wed, 28 Mar 2012 12:03:51 +0200 Subject: String interpolation bug fix This change fixes a bug in class StringContext.scala. Parts were not correctly added to the resulting string. This commit includes a test case which covers the example reported in the bug. Closes SI-5614. --- test/files/run/t5614.check | 3 +++ test/files/run/t5614.flags | 1 + test/files/run/t5614.scala | 5 +++++ 3 files changed, 9 insertions(+) create mode 100644 test/files/run/t5614.check create mode 100644 test/files/run/t5614.flags create mode 100644 test/files/run/t5614.scala (limited to 'test') diff --git a/test/files/run/t5614.check b/test/files/run/t5614.check new file mode 100644 index 0000000000..f659f2da3b --- /dev/null +++ b/test/files/run/t5614.check @@ -0,0 +1,3 @@ +3 +a +b diff --git a/test/files/run/t5614.flags b/test/files/run/t5614.flags new file mode 100644 index 0000000000..48fd867160 --- /dev/null +++ b/test/files/run/t5614.flags @@ -0,0 +1 @@ +-Xexperimental diff --git a/test/files/run/t5614.scala b/test/files/run/t5614.scala new file mode 100644 index 0000000000..7c85c33f12 --- /dev/null +++ b/test/files/run/t5614.scala @@ -0,0 +1,5 @@ +object Test extends App { + val str = s"a\nb" + println(str.length) + println(str) +} -- cgit v1.2.3