-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement @use scheme #21740
base: main
Are you sure you want to change the base?
Implement @use scheme #21740
Conversation
This is done for comparing old with new
Add the path cases without changing the whole logic
If we refer to a path `a.b`, we should mark `a.b` as used, which is better than marking `a`.
Needed to make stdlib2-cc go through. There were two errors. One in LayListIterable required a type annotation and a tweak to markFree. The other in Vieew.scala required a cast, but this could be fixed with better handling of pattern matching. path-patmat-should-be-pos.scala is a minimization.
We extend the grammar to allow e.g. `Iterator[T]^ @use`.
Built on the paths PR |
Good luck for https://github.com/unbox, bad luck for https://github.com/use (or their inboxes 😉). I hope no language or framework author ever thinks |
Tempting... As a side note you can always do Edit: Ach I see that it's already used in the description also, it's just way to easy to forget. |
OK, will backquote things from now on. |
New experimental polymorphic effect system confirmed. |
cap
to a reach capability under a@use
, the reach capability becomes use-declared.x*@use
for debugging.@use
annotation are also allowed to leak into the enclosing method..@use
, we charge the deep capture set of the argument to the currently enclosing environments.cap
and the parameter is not referred to from a function result, add an implied @use to the parameter type. The idea is that we'd pass a parameter with universal capturing type only if the parameter is either returned or used in the method. So if it is not returned we can infer an @use.