File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
tests/neg-custom-args/captures Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 1+ -- Error: tests/neg-custom-args/captures/i24309-region-orig.scala:17:36 ------------------------------------------------
2+ 17 | val x = r1.subregion[Ref^{r1.R}]: r2 => // error, limitation
3+ | ^
4+ | Local reach capability r1.R leaks into capture scope of enclosing function.
5+ | You could try to abstract the capabilities referred to by r1.R in a capset variable.
6+ 18 | var a: Ref^{r1.R} = r1.alloc(0)
7+ 19 | var b: Ref^{r2.R} = r2.alloc(0)
8+ 20 | val c: Ref^{r1.R} = b
9+ 21 | a
Original file line number Diff line number Diff line change 1+ -- Error: tests/neg-custom-args/captures/i24309a.scala:4:34 ------------------------------------------------------------
2+ 4 |def runOps2[C^](): Unit = runOps[{C}](???) // error
3+ | ^
4+ | Capture set parameter C leaks into capture scope of method runOps2.
You can’t perform that action at this time.
0 commit comments