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

Incorrect deprecation message: "Octal escape literals are deprecated, use ... instead" #11912

Open
MasseGuillaume opened this issue Mar 19, 2020 · 1 comment

Comments

@MasseGuillaume
Copy link
Member

@MasseGuillaume MasseGuillaume commented Mar 19, 2020

reproduction steps

compile the following:

println("\033c".hashCode())

obtained

\u001b

Octal escape literals are deprecated, use \u001b instead.
[warn]       println("\033c".hashCode())
[warn]                ^
[warn] one warning found

expectation

it should be \u001bc

Octal escape literals are deprecated, use \u001bc instead.
[warn]       println("\033c".hashCode())
[warn]                ^
[warn] one warning found

Scala 2.13.1
https://scastie.scala-lang.org/9hvZnukeQEisQ7aUrA56Hw

@som-snytt

This comment has been minimized.

Copy link

@som-snytt som-snytt commented Mar 19, 2020

The recommendation specifies the character instead of repeating the whole text.

scala> "\012c".length
        ^
       error: octal escape literals are unsupported: use \n instead

If the question is how long is the patch, it should do the doti and ^^^^.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.