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

String interpolation with constants #8650

Open
scabug opened this Issue Jun 6, 2014 · 3 comments

Comments

Projects
None yet
1 participant
@scabug
Copy link

scabug commented Jun 6, 2014

String interpolation can't be a constant?

final val x = "hello" // constant
final val y = s"$x world" // not constant
@scabug

This comment has been minimized.

Copy link

scabug commented Jun 6, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8650?orig=1
Reporter: @okomok
Affected Versions: 2.11.1
See #8608

@scabug

This comment has been minimized.

Copy link

scabug commented Jun 9, 2014

@som-snytt said:
Contributing this to the f interpolator. The interesting twist is indexed args {code}f"$x%f == %<.3f == %1$$.3f"{code}

@scabug

This comment has been minimized.

Copy link

scabug commented Jan 31, 2015

@som-snytt said (edited on Feb 13, 2015 9:54:44 AM UTC):
scala/scala#4316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment