New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
f string interpolator no longer accepts literal % #7325
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7325?orig=1 |
@xeno-by said (edited on Apr 3, 2013 3:02:56 PM UTC): scala> "%.2f%".format(0.0)
java.util.UnknownFormatConversionException: Conversion = '%'
at java.util.Formatter.checkText(Formatter.java:2503)
at java.util.Formatter.parse(Formatter.java:2485)
at java.util.Formatter.format(Formatter.java:2414)
at java.util.Formatter.format(Formatter.java:2367)
at java.lang.String.format(String.java:2769) Why should f"" behave differently? |
@retronym said: I think it might be worth a trip to scala-language or scala-sips to find a consensus. Personally, I'm not strongly attached to the 2.10.x behaviour. One way or another, we should explicitly tests this, document the decision in the Scaladoc for |
@paulp said (edited on Apr 4, 2013 5:35:05 AM UTC): scala> f"%%"
java.util.UnknownFormatConversionException: Conversion = '%'
at java.util.Formatter.checkText(Formatter.java:2547)
at java.util.Formatter.parse(Formatter.java:2533)
at java.util.Formatter.format(Formatter.java:2469)
at java.util.Formatter.format(Formatter.java:2423) |
@som-snytt said: So long as we're on a trip to sip. |
@xeno-by said: |
@xeno-by said: |
The text was updated successfully, but these errors were encountered: