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/t7325.scala | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/files/run/t7325.scala (limited to 'test/files/run/t7325.scala') diff --git a/test/files/run/t7325.scala b/test/files/run/t7325.scala new file mode 100644 index 0000000000..26f6bc6ef7 --- /dev/null +++ b/test/files/run/t7325.scala @@ -0,0 +1,25 @@ +object Test extends App { + // println(f"%") + println(f"%%") + // println(f"%%%") + println(f"%%%%") + // println(f"%%%%%") + println(f"%%%%%%") + + println(f"%%n") + println(f"%%%n") + println(f"%%%%n") + println(f"%%%%%n") + println(f"%%%%%%n") + println(f"%%%%%%%n") + + // println(f"${0}%") + println(f"${0}%d") + println(f"${0}%%d") + // println(f"${0}%%%d") + println(f"${0}%%%%d") + // println(f"${0}%%%%%d") + + println(f"${0}%n") + println(f"${0}%d%n") +} \ No newline at end of file -- cgit v1.2.3