diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-03-03 10:17:48 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-03-03 10:17:48 +0100 |
commit | a180d2e484731ee1bbe5e065930da98d0f36dfb9 (patch) | |
tree | 72a9c7776469b38a6467bc24c566ba13e126388e /test | |
parent | d852612c3537f2e4506dd838c719d44a3031679d (diff) | |
download | scala-a180d2e484731ee1bbe5e065930da98d0f36dfb9.tar.gz scala-a180d2e484731ee1bbe5e065930da98d0f36dfb9.tar.bz2 scala-a180d2e484731ee1bbe5e065930da98d0f36dfb9.zip |
Handle empty format specifiers in the formatting interpolator.
f"${foo}" is treated like f"${foo}%s".
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/interpolation.check | 6 | ||||
-rw-r--r-- | test/files/run/interpolation.scala | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/interpolation.check b/test/files/run/interpolation.check index 09579a800a..997abb4497 100644 --- a/test/files/run/interpolation.check +++ b/test/files/run/interpolation.check @@ -24,3 +24,9 @@ Best price: 13.345 Best price: 13.35 13.345% discount included 13.35% discount included + +0 +00 + +0 +00 diff --git a/test/files/run/interpolation.scala b/test/files/run/interpolation.scala index a0a185eaab..f443bd5feb 100644 --- a/test/files/run/interpolation.scala +++ b/test/files/run/interpolation.scala @@ -23,4 +23,10 @@ object Test extends App { test2(10.0f) test2(13.345f) + println(s"") + println(s"${0}") + println(s"${0}${0}") + println(f"") + println(f"${0}") + println(f"${0}${0}") } |