You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--Error: issues/cc-reach-ext.scala:5:61---------------------------------------5|defrunOps(@use ops: List[() =>Unit]):Unit= ops.foreach(op => op()) // error|^^^^^^^^^^|Local reach capability ops* leaks into capture scope of method runOps$extension.
|To allow this, the parameter ops should be declared with a @use annotation
Expectation
Both runOps methods should compile. Note that the only differences between them are whether they are a value class (whether it extends AnyVal).
The text was updated successfully, but these errors were encountered:
This is a minimisation of the failing stdlib method in #23291. It is related to value classes and extension methods, it seems that the @use annotation gets discarded.
Compiler version
main
Minimized code
Output
Expectation
Both
runOps
methods should compile. Note that the only differences between them are whether they are a value class (whether itextends AnyVal
).The text was updated successfully, but these errors were encountered: