Skip to content

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

@odersky odersky requested a review from dwijnand September 13, 2024 11:21
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