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 use of exported prefix #14461

Merged
merged 2 commits into from
Feb 13, 2022
Merged

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Feb 12, 2022

Based on #14457, with an alternative fix.

dwijnand and others added 2 commits February 12, 2022 19:50
An exported enum is a <static> final method of the enum object.  When
selecting an inner enum case from it, that method will be the prefix.
The method doesn't have a type symbol, we have to widen to method type
and reach for its result type before we can get a handle on the type
symbol to key off of.

I wonder whether this widening and going to the result type is something
that should happen during Erasure's denotation transformation though...

Co-authored-by: Seth Tisue <[email protected]>
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Martin. I like it much better as a more upstream fix.

@odersky odersky merged commit 679f3d8 into scala:main Feb 13, 2022
@odersky odersky deleted the fix-use-of-exported-prefix branch February 13, 2022 14:15
@dwijnand dwijnand linked an issue Feb 13, 2022 that may be closed by this pull request
@Kordyjan Kordyjan added this to the 3.1.3 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.

Compiler crash using export instead of import
3 participants