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 isAliasType #20195

Merged
merged 5 commits into from
Apr 24, 2024
Merged

Fix isAliasType #20195

merged 5 commits into from
Apr 24, 2024

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 15, 2024

Symbols that had the TypeParam flag set were classified as alias types unless they also had the Deferred flag set. Maybe this did not break that much since Namer always added the Deferred for type parameters. But export forwarders use synthesized parameters which did not have Deferred set.

Fixes #20079

Symbols that had the TypeParam flag set were classified as alias types unless they also had
the Deferred flag set. Maybe this did not break that much since Namer always added the Deferred
for type parameters. But export forwarders use synthesized parameters which did not have Deferred
set.
There were some other occurrences of isAbstractType where it was not clear why
type parameters should be excluded. Use isAbstractOrParamType as the new default.
@smarter
Copy link
Member

smarter commented Apr 16, 2024

Maybe this did not break that much since Namer always added the Deferred for type parameters. But export forwarders use synthesized parameters which did not have Deferred set.

Could we align both Namer and export forwarders to use the same flags here?

Always use isAbstractorParamType. quotes.reflect still uses isAbstractType for backwards compatibility,
but it now also includes type parameters. This was the case anyway before for type parameters set up by
Namer.
@odersky odersky assigned smarter and unassigned bishabosha Apr 24, 2024
@odersky odersky requested a review from smarter April 24, 2024 10:35
@smarter smarter merged commit b3f0aca into scala:main Apr 24, 2024
19 checks passed
@smarter smarter deleted the fix-20079 branch April 24, 2024 14:14
@Kordyjan Kordyjan added this to the 3.5.0 milestone May 10, 2024
WojciechMazur added a commit that referenced this pull request Jul 6, 2024
Backports #20195 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
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.

Exports generate broken code depending on location (scope) of said code
4 participants