-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Refactorings on Names: forbid .name
on Name and cleanups on the way
#4834
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
The current type is inconsistent with other uses of likeSpaced. And mentioning `name` in a return type would prevent making it private as in next commit.
This is easy for `TermNameDecorator`, and last commit makes it easy for `NameDecorator`.
This lets you think that `tree.name` is sensible tho it isn't, and for more than an year (since ce333b1).
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.
Otherwise LGTM.
Can you squash your commits into a single one?
@@ -98,7 +98,7 @@ object Names { | |||
/** A name in the same (term or type) namespace as this name and | |||
* with same characters as given `name`. | |||
*/ | |||
def likeSpaced(name: Name): ThisName | |||
def likeSpaced(name: PreName): ThisName |
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.
Currently, there don't seems to be usages for likeSpaced(PreName)
so I would keep the API as is. If you want to share the implementation with the one in NameOps
, it seems you can actually replace PreName
by Name
Do you mind if I do a GitHub squash merge instead (once tests pass)? These are intentionally separate. |
Did you know you could call
.name
on aName
? No more! 😄Extracted from #4729 after we saw more with @allanrenucci , assigned to him.