-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #14667: Remove mangling of inner AnyQualifiedName's in fullNameSeparated #14749
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
I think the linked ticket ought to be #14667 ? |
I don't know. It seems to be a very fundamental change to mangle or not, and mangling is explicitly demanded in the comment. So if we drop it I suggest to add an extensive test suite that makes sure nothing goes wrong. Maybe do first some research where fullNames are used in the compiler. |
I finally took the time to investigate the places where we use
Therefore, I think it is safe to remove the mangling in this case. Moreover, removing the mangling will bring the |
…ameSeparated. This brings the `case name @ AnyQualfiedName(_, _)` in line with the behavior of `case naem: SimpleName`, which already did not mangle before this change. This fixes scala#14667 because `Mixin.traitSetterName` indirectly calls `fullNameSeparated`, and expanded private symbolic member names would get mangled, and therefore could not identify their corresponding fields anymore.
I rebased and elaborated the commit message. |
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.
Let's see whether we can drop the clause altigether.
@@ -488,7 +488,7 @@ object SymDenotations { | |||
if kind == FlatName && !encl.is(JavaDefined) then qn.compactified else qn | |||
val fn = name replace { | |||
case name: SimpleName => qualify(name) | |||
case name @ AnyQualifiedName(_, _) => qualify(name.mangled.toSimpleName) |
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.
In fact I now doubt whether we should have this case at all. If we remove this line, then #15702 succeeds. So if we can to this, it would be better.
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 just found out that at least for trait setters dropping the clause does not work unfortunately. So I think this is at least a step in the right direction.
resolves #14667
cc @sjrd