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
Incorrect handle of unicode escapes in triple-quoted string #11640
Comments
/cc @martijnhoekstra for his escaping expertise :) |
2.13 emits a deprecation warning for the escape in a triple quoted string, scala 3 doesn't handle the escape anymore. I believe that behaviour follows the principle of least astonishment: Unicode escapes are treated as any other escape, that is to say, they're escaped in single quoted strings, backquoted identifiers and char literals and by the The three options that will work with any version are
For this particular string, those are respectively Reference #8480 and scala/scala#8282 |
I just realized the quote escaping needed for the interpolation is not in scala 2. I don't have the determination to get that through SIP. If you go for that route, you need to interpolate those in too if you want to cross compile with the interpolation |
fyi @dwijnand |
Maybe there is room in Dr Odersky's research budget to hire a PhD specializing in backslashes. Usually the academic life is characterized by backstabbing rather than backslashing. I was intrigued by the last comment, which I don't understand yet. I see there is
Sorry, I got pulled away from my experiment. I'll post this comment anyway for the joke. Hopefully worth it. I think |
|
That's enough for me to close the issue then, sounds like we're not doing anything wrong. |
Compiler version
3.0.0-RC1
Minimized code
Output
This is what it prints in 3.0.0-RC1
Expectation
This is what it prints in 2.13.4 and 2.12.13
The text was updated successfully, but these errors were encountered: