Skip to content
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 expansion and unexpansion of mixin qualified names #15712

Merged
merged 3 commits into from
Jul 21, 2022

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jul 20, 2022

A mixin qualifier foo$A is a qualified name. Previously these
were flattened to SimpleNames when expanding with a trait prefix.
But then ResolveSuper cannot decompose the name anymore.

To fix this, we now treat QualifiedNames specially in the replace
calls for SymDenotations#fullNameSeparated and NameOps#unexpanded.
Qualifiers are preserved and the replacement proceeds recursively
to their underlying part. For some as yet unknown reason we can't
do this for TraitSetterNames. It seems these need to be flattened.

Fixes #15702

odersky added 2 commits July 20, 2022 22:10
A mixin qualifier foo$A is a qualified name. Previously these
were flattened to SimpleNames when expanding with a trait prefix.
But then ResolveSuper cannot decompose the name anymore.

To fix this, we now treat QualifiedNames specially in the replace
calls for SymDenotations#fullNameSeparated and NameOps#unexpanded.
Qualifiers are preserved and the replacement proceeds recursively
to their underlying part. For some as yet unknown reason we can't
do this for TraitSetterNames. It seems these need to be flattened.

Fixes scala#15702
@odersky odersky requested a review from sjrd July 21, 2022 11:54
@sjrd sjrd merged commit 8e309b0 into scala:main Jul 21, 2022
@sjrd sjrd deleted the fix-15702 branch July 21, 2022 12:44
@Kordyjan Kordyjan added this to the 3.2.1 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error with super accessors
3 participants