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

Treat more closure parameter types as inferred #21583

Merged
merged 3 commits into from
Sep 13, 2024

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Sep 13, 2024

This is necessary for types that contain possibly illegal @retains annotations since those annotations are only removed before pickling for InferredTypes.

Fixes #21437

This is necessary for types that contain possibly illegal @retains annotations
since those annotations are only removed before pickling for InferredTypes.

Fixes scala#21347
The operations of an ExplainingTypeComparer are expensive. So we should only
run it when producing an error message.
@odersky
Copy link
Contributor Author

odersky commented Sep 13, 2024

@dwijnand I put you down as a reviewer just to check that edd40bc is OK.

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.

Ah ok, didn't think it would be expensive, but I can understand that concern. My usecase is tracing execution, so running things twice is confusing and duplicative. So I might've used comparing { cmp => so I can switch back to the expensive TypeComparer.explaining { cmp => when debugging and avoid the double run. But my preference shouldn't impede your fix.

@odersky odersky merged commit e7763eb into scala:main Sep 13, 2024
28 checks passed
@odersky odersky deleted the fix-21437 branch September 13, 2024 15:12
@WojciechMazur WojciechMazur added this to the 3.6.0 milestone Oct 8, 2024
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.

Pickling crash on inferred capture set parameter in function
3 participants