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
importlanguage.experimental.captureCheckingdefrunOps(ops: List[() =>Unit]):Unit=
ops.foreach(op => op())
defmain():Unit=valf:List[() =>Unit] ->Unit= runOps // should be error
Output
It compiles.
Expectation
It should not, as runOps unboxes the list elements and executes them, so runOps should not be pure. Based on the theory, we should simply prevent runOps from typechecking.
The text was updated successfully, but these errors were encountered:
Compiler version
main
Minimized code
Output
It compiles.
Expectation
It should not, as
runOps
unboxes the list elements and executes them, sorunOps
should not be pure. Based on the theory, we should simply preventrunOps
from typechecking.The text was updated successfully, but these errors were encountered: