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
Align leading infix operator with Scala 3 improvements #9567
Conversation
1f8dc38
to
6e0e4f1
Compare
This doesn't seem like a final error message — was this a reminder to yourself to do some more work on the code, or is it just something we need to find a better wording for? |
@SethTisue that was a Scala 3 test. I tried to keep the code diff close to Dotty, as these are backports. |
This is related to that bug, but it doesn't fix that bug. In that bug, we agreed that the main thing we want fixed is:
which is just plain wrong. I guess that's what you meant by:
You also wrote:
but that doesn't make sense to me. No warning should be issued, regardless of whether (Perhaps this PR is mergeable regardless, that's a separate question...) |
Sorry I missed Seth's question. Yes, that's basically what I mean. About to push rebase and Dale's idea to just skip the warning, modulo |
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.
Difficult to follow it all, but the test cases and test case diffs look good. Thank you Som for spending the time to re-align our impl with Scala 3's!
Oh, @som-snytt could you tweak the PR description a little with the changes? Seth and I will also do a pass, but it's probably easier for you to describe them. |
Align "leading infix operator" with Scala 3. The feature is available under
-Xsource:3
, and a migration warning is available under-Xmigration:2.13
.Improvements include allowing an infix operator on a line by itself, and a better heuristic for whether to take a back-quoted identifier as an infix operator.
Fixes scala/bug#12071