From cb1a427d8ad4a92690610bfa7d6c79f48d440864 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sat, 27 Apr 2013 15:26:34 +0200 Subject: SI-7325 cleans up corner cases of percent handling in StringContext.f See comments in code for the exhaustive list of the cases handled. Also note that treatment of non-formatting percents has been changed. Embedding literal %'s now requires escaping. Moreover, this commit also features exact error positions for string interpolation, something that has been impossible until the fix for SI-7271, also included in this patch. --- test/files/run/interpolationMultiline1.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/files/run/interpolationMultiline1.scala') diff --git a/test/files/run/interpolationMultiline1.scala b/test/files/run/interpolationMultiline1.scala index 437aed44b0..db634e7775 100644 --- a/test/files/run/interpolationMultiline1.scala +++ b/test/files/run/interpolationMultiline1.scala @@ -13,7 +13,7 @@ object Test extends App { println(s"""Best price: $f""") println(f"""Best price: $f%.2f""") println(s"""$f% discount included""") - println(f"""$f%3.2f% discount included""") + println(f"""$f%3.2f%% discount included""") } test1(1) -- cgit v1.2.3