Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Sep 22, 2025

Fixes #24006

@odersky odersky requested a review from jchyb September 22, 2025 17:45
Copy link
Contributor

@jchyb jchyb left a comment

Choose a reason for hiding this comment

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

This is a good improvement even regardless of the regression. I only worry a bit because the same information could have also been accessed via explicitly matching against AppliedType(_, tArgs), which will also break now (although thankfully not in the linked project, where I only saw the problem with .typeArgs). Still, I understand that adjusting type inference to fit possible outdated macro implementations would be far too impractical

@odersky
Copy link
Contributor Author

odersky commented Sep 22, 2025

@jchyb Yes, I think the solution needs to be to make macros more robust with respect to variations. Adding an annotation to a type should not be a breaking change.

@noti0na1
Copy link
Member

noti0na1 commented Sep 22, 2025

Wow, my PR is after your. Your laptop must be running faster on the tests than mine 😂

Copy link
Member

@noti0na1 noti0na1 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 66f8213 into scala:main Sep 23, 2025
50 checks passed
@odersky odersky deleted the fix-24006 branch September 23, 2025 11:44
@WojciechMazur WojciechMazur added this to the 3.8.0 milestone Oct 28, 2025
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.

Regression: inferred types with @retains cause previous macro implementations to crash

4 participants