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

Only pickle StableRealizable flag for methods #11858

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Mar 23, 2021

Fixes #9276

That aligns behavior with the TastyFormat doc, where it says:

STABLE  -- Method that is assumed to be stable, i.e. its applications are legal paths

For other occurrences of StableRealizable, we either reconstitute them if they are implied
(i.e. for module vals and enum values), or we recompute them in realizability checking as needed.

Fixes scala#9276

That aligns behavior with the TastyFormat doc, where it says:

    STABLE  -- Method that is assumed to be stable, i.e. its applications are legal paths

For other occurrences of StableRealizable, we either reconstitute them if they are implied
(i.e. for module vals and enum values), or we recompute them in realizability checking as needed.
@odersky odersky added this to the 3.0.0-RC2 milestone Mar 23, 2021
@odersky odersky requested a review from bishabosha March 23, 2021 10:49
@bishabosha
Copy link
Member

bishabosha commented Mar 23, 2021

what is an example of a method that would get the StableRealizable flag?

it seems constructors and exported forwarders get them at desugaring at least

@odersky
Copy link
Contributor Author

odersky commented Mar 24, 2021

@bishabosha The methods that get it now are export forwarders and constructors and parameter forwarders (but I think these get created only after pickling). But there might be others in the future. Also, we might want to add the possibility that a user can annotate a method with @stable.

Copy link
Member

@bishabosha bishabosha left a comment

Choose a reason for hiding this comment

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

LGTM

@odersky odersky merged commit 3ebf22e into scala:master Mar 25, 2021
@odersky odersky deleted the fix-9276-alt branch March 25, 2021 13:11
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.

Val is not stable unless path requested by use site
2 participants