-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Note changes in unicode escapes and case companion #2943
Conversation
It looks like CI fails for SIP links to virtus labs. Difficult to keep internal docs in sync with external sites that may evolve dynamically. |
@@ -139,6 +139,14 @@ REPL, but won't work in typical Scala 3 application code. | |||
For an alternative way to detect the Scala 3 version, see | |||
[this gist](https://gist.github.com/romanowski/de14691cab7340134e197419bc48919a). | |||
|
|||
### I want to use Scala 3 but now a bunch of stuff just broke in my project. What's up with that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think this should be in the FAQ.
{% endtab %} | ||
{% endtabs %} | ||
|
||
In Scala 2.13.13, this behavior is enabled under `-Xsource:3cross`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Scala 2.13.13, this behavior is enabled under `-Xsource:3cross`. | |
In Scala 2.13.13, this behavior is enabled under `-Xsource:3-cross`. |
|
||
## Unicode escapes | ||
|
||
Unicode escapes of the form `\u0061` are no longer natively supported in any position by the compiler. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"natively supported" seems unclear to me. not sure what best replacement is, maybe:
Unicode escapes of the form `\u0061` are no longer natively supported in any position by the compiler. | |
Unicode escapes of the form `\u0061` are no longer allowed in arbitrary locations in source code. |
|
||
Unicode escapes of the form `\u0061` are no longer natively supported in any position by the compiler. | ||
|
||
Instead, they processed like other escapes in string literals. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead, they processed like other escapes in string literals. | |
Instead, they are processed in string literals, just like other escape sequences. |
Instead, they processed like other escapes in string literals. | ||
This means, in particular, that they are not processed in "triple-quoted" strings or by the `raw` interpolator. | ||
|
||
In Scala 2, a deprecation is issued, but under `-Xsource:3cross`, the behavior is the same as Scala 3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Scala 2, a deprecation is issued, but under `-Xsource:3cross`, the behavior is the same as Scala 3. | |
In Scala 2, a deprecation is issued, but under `-Xsource:3-cross`, the behavior is the same as Scala 3. |
Scala 3 acquired extra help for case companions which was backported to Scala 2 (under
-Xsource:3-cross
). 🤞I did not build locally to review output, so this is best-effort for formatting.