Skip to content

Conversation

@bracevac
Copy link
Contributor

@bracevac bracevac commented Nov 14, 2025

Builds on #24424

Tasks

  • Take a path's consume capabilities into account in consume check in checkUse.
  • More neg tests.
  • Improve the error message if possible.

@bracevac
Copy link
Contributor Author

@odersky it seems to be stable now. I will add some more neg tests. Do you agree with the general direction, or should we try something else?

@bracevac
Copy link
Contributor Author

I'm also surprised that reach capabilities would pop up where there are no boxes involved whatsoever.

odersky and others added 5 commits November 17, 2025 11:09
* Do not include root capabilities when computing consumed paths.
* Adjust exemption check to consider both capability and its reach,
  except for root capabilities.
@bracevac bracevac force-pushed the consume-in-constructor-new branch from 87012a8 to a539295 Compare November 17, 2025 10:10
case _ =>
acc

def capsFromConsumeFields(ref: TermRef): Refs =
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need that? Would not the path root already contain the field consumed set?

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.

2 participants