diff options
author | Som Snytt <som.snytt@gmail.com> | 2014-02-04 19:29:16 -0800 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2014-02-04 19:49:55 -0800 |
commit | f8e0f9810b7b24e78823e039d2bb77b7d1be9154 (patch) | |
tree | af1ec75b269a945de9d52ba27e9649b66910019d /test/files/neg | |
parent | 8053682d4ff0dcff3c1846a1bac9c718c92cc704 (diff) | |
download | scala-f8e0f9810b7b24e78823e039d2bb77b7d1be9154.tar.gz scala-f8e0f9810b7b24e78823e039d2bb77b7d1be9154.tar.bz2 scala-f8e0f9810b7b24e78823e039d2bb77b7d1be9154.zip |
SI-8092 Refactor f-interp
A denshish refactor makes the FormatInterpolator a nice bundle
that destructures its input and flattens out the classes to
give the code some elbow room. Everything shifts left.
The `checkType` method is refolded and renamed `pickAcceptable`.
An additional test case captures the leading edge test, that
a % should follow a hole, and which is the most basic
requirement.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/stringinterpolation_macro-neg.check | 5 | ||||
-rw-r--r-- | test/files/neg/stringinterpolation_macro-neg.scala | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/test/files/neg/stringinterpolation_macro-neg.check b/test/files/neg/stringinterpolation_macro-neg.check index 00002f5a4b..703846ad62 100644 --- a/test/files/neg/stringinterpolation_macro-neg.check +++ b/test/files/neg/stringinterpolation_macro-neg.check @@ -165,5 +165,8 @@ stringinterpolation_macro-neg.scala:71: error: Date/time conversion must have tw stringinterpolation_macro-neg.scala:72: error: Missing conversion operator in '%10.5'; use %% for literal %, %n for newline f"$s%10.5" ^ +stringinterpolation_macro-neg.scala:75: error: conversions must follow a splice; use %% for literal %, %n for newline + f"${d}random-leading-junk%d" + ^ three warnings found -44 errors found +45 errors found diff --git a/test/files/neg/stringinterpolation_macro-neg.scala b/test/files/neg/stringinterpolation_macro-neg.scala index c5ae708f21..3869d42d66 100644 --- a/test/files/neg/stringinterpolation_macro-neg.scala +++ b/test/files/neg/stringinterpolation_macro-neg.scala @@ -70,4 +70,7 @@ object Test extends App { f"$t%tG" f"$t%t" f"$s%10.5" + + // 8) other brain failures + f"${d}random-leading-junk%d" } |