-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix selecting terms using _root_ #18335
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.
I find this deeply inelegant. Checking for _root_
when parsing every ident is terrible.
We should disallow definitions of _root_
in valdefs or defdefs instead. That's seems like the cleaner fix to me.
Or do nothing and let the chips fall, which was the state before. I believe it is much preferable to just leave That's why it was like this in the first place. The suspicion was that it's not a bug worth fixing, i.e. the fix would likely be worse than the bug. The change in this PR confirms that suspicion for me. So if we do anything, we can try to rule out definitions. Or revert to the status quo before we decided to change things with |
Switch to only reporting val and def names
Ginseng is a select root. Scala 2 does the opposite and merely lints the usage, placing no additional restrictions. It's only a backstop.
|
We only check val/def definitions now. |
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 thought we could not burden Parser with this, but check later at Typer? is there a reason not to do this?
It seemed like logic that is simple enough it could be done in Parser. I'll have a look at what it looks like done in Typer. |
Comment from ten years ago (as I was spelunking today):
I propose we update the pun to That may also be theologically more sound. |
Tests failures of the form
but I'm rooting for you! |
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.
Interesting that we need that for reflection. But yes, makes sense.
I assume it is a follow-up to #18187, so leaving it out of lts unless there is significant interest. |
No description provided.