Skip to content

Changes to usage leak detection and reporting#26253

Open
odersky wants to merge 2 commits into
scala:mainfrom
dotty-staging:fix-localcap-use
Open

Changes to usage leak detection and reporting#26253
odersky wants to merge 2 commits into
scala:mainfrom
dotty-staging:fix-localcap-use

Conversation

@odersky
Copy link
Copy Markdown
Contributor

@odersky odersky commented Jun 7, 2026

Two changes:

Report leakage errors and separation errors only if no errors previously

This should help with keeping error messages more focused.

I noted that programs that have regular capture check errors sometimes have strange
leakage and separation errors in addition. We now suppress these and issue them only
if all regular capture check errors are resolved.

Fix detection and reporting of LocalCap leaks

Some went undetected before. And the logic that allowed uses inside boxing environments was missing.
This will become more important when we drop reach capabilities, since then LocalCap leaks will become more common.

odersky added 2 commits June 7, 2026 20:04
This should help with keeping error messages more focused.

I noted that programs that have regular capture check errors sometimes have strange
leakage and separation errors in addition. We now suppress these and issue them only
if all regular capture check errors are resolved.
Some went undetected before. And the logic that allowed
uses inside boxing environments was missing.
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.

1 participant