Skip to content

Conversation

noti0na1
Copy link
Member

@noti0na1 noti0na1 commented Sep 7, 2025

Fix #23885

@noti0na1 noti0na1 changed the title Fix #23885: Skip capture sets in checkNoPrivateLeaks when cc is not enabled Fix #23885: Skip capture sets in checkNoPrivateLeaks and drop them in posttyper when cc is not enabled Sep 7, 2025
@noti0na1 noti0na1 marked this pull request as ready for review September 7, 2025 22:42
@noti0na1 noti0na1 requested a review from odersky September 8, 2025 08:21
@sjrd
Copy link
Member

sjrd commented Sep 8, 2025

I thought all cc-related annotations were immediately dropped and never visible to non-cc users. If they end up here, doesn't that means that early drops were missed?

If they are not dropped early, how do you prevent the annotations (or their pretty-printed form) never to appear in error messages, for example?

@noti0na1
Copy link
Member Author

noti0na1 commented Sep 8, 2025

I guess CleanupRetains was designed to drop any capture annotation in non-cc code, but ends up drop nothing. If we want prevent capture annotation showing in any error message, we should drop them in typer.

@odersky odersky merged commit d0f0819 into scala:main Sep 10, 2025
44 checks passed
@odersky odersky deleted the fix-23885 branch September 10, 2025 12:20
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.

Seq.++ leaks private symbols to infered type signature
3 participants