Skip to content
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 doc page should cover pattern matching #2687

Open
SethTisue opened this issue Jan 30, 2023 · 0 comments · May be fixed by #3118
Open

String interpolation doc page should cover pattern matching #2687

SethTisue opened this issue Jan 30, 2023 · 0 comments · May be fixed by #3118
Assignees

Comments

@SethTisue
Copy link
Member

I was surprised today to notice that https://docs.scala-lang.org/overviews/core/string-interpolation.html makes no reference to the use of string interpolation in patterns, e.g. with the s interpolator:

scala 2.13.10> "foo bar" match { case s"f${x}r" => x }
               ^
               warning: match may not be exhaustive.
val res1: String = oo ba

there is a bit of material on this https://docs.scala-lang.org/sips/string-interpolation.html but not very much (it only references a theoretical xml interpolator — understandable since the SIP predates any use of the feature in the Scala stdlib)

@bishabosha bishabosha self-assigned this Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants