-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Reject char literal of raw newline #8282
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
Conversation
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.
Hello, and thank you for opening this PR! 🎉
All contributors have signed the CLA, thank you! ❤️
Have an awesome day! ☀️
Double checking that it's not possible to write the test with
I noticed
It's not obvious that these are different with respect to tokenization, except literal vs identifier. Scala 2 had a ticket IIRC for double slash in a name. I can't find it. |
a56f9b9
to
2c1c98f
Compare
/rebuild |
Not sure how to communicate with do-bo. The restart button on drone is disabled. |
@som-snytt you can push an empty commit or rebase + force push |
62e5731
to
36a1a6a
Compare
Why not though? |
Don't allow char literal to span a natural line ending, but do allow `'\u000A'` to mean `'\n'`. The spec was updated to reflect that meaning, and the direction is to eliminate Unicode escapes outside quotes. Update the test rig so that `// anypos-error` can be used to match any position, since the test cannot be expressed on one line with a trailing comment.
36a1a6a
to
dff31fb
Compare
Rebased and fixed conflict with whitespace change. The controversial part is support for |
Hey there, thanks for the PR!
|
The scala 2 ticket and PR say the spec disallowed it, and the ticket quotes it, but I can't find it at the moment. (or after looking for a half hour) scala/bug#10133 The test rig requires the error comment? Everything that happened before the pandemic feels like a long time ago, and in fact I was getting sick that week, so I don't quite recall. The check file shows what error message was produced, not only that there was an error. My initial expectation was that the error comment would include the expected error text, perhaps as a regex. |
I was a bit ill as well when the lockdowns hit. Hope everything's all right on your side. Reg. the PR: I was under the impression that the test rig required either |
Don't allow char literal to span a natural line
ending, but do allow
'\u000A'
to mean'\n'
.The spec was updated to reflect that meaning,
and the direction is to eliminate Unicode escapes
outside quotes.
Update the test rig so that
// anypos-error
can beused to match any position, since the test cannot
be expressed on one line with a trailing comment.
Forward port of fix on 2.12.
scala/scala@d7547cb