|
1 | 1 | -- Error: tests/neg-custom-args/captures/usingLogFile.scala:23:27 ------------------------------------------------------
|
2 | 2 | 23 | val later = usingLogFile { f => () => f.write(0) } // error
|
3 | 3 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
4 |
| - | The expression's type {*} () -> Unit is not allowed to capture the root capability `*`. |
| 4 | + | The expression's type box {*} () -> Unit is not allowed to capture the root capability `*`. |
5 | 5 | | This usually means that a capability persists longer than its allowed lifetime.
|
6 | 6 | -- Error: tests/neg-custom-args/captures/usingLogFile.scala:29:9 -------------------------------------------------------
|
7 | 7 | 29 | later2.x() // error
|
8 | 8 | | ^^^^^^^^
|
9 |
| - | The expression's type {*} () -> Unit is not allowed to capture the root capability `*`. |
| 9 | + | The expression's type box {*} () -> Unit is not allowed to capture the root capability `*`. |
10 | 10 | | This usually means that a capability persists longer than its allowed lifetime.
|
11 | 11 | -- Error: tests/neg-custom-args/captures/usingLogFile.scala:31:6 -------------------------------------------------------
|
12 | 12 | 31 | var later3: () => Unit = () => () // error
|
13 | 13 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
14 |
| - | The mutable variable's type {*} () -> Unit is not allowed to capture the root capability `*`. |
| 14 | + | The mutable variable's type box {*} () -> Unit is not allowed to capture the root capability `*`. |
15 | 15 | | This usually means that a capability persists longer than its allowed lifetime.
|
16 | 16 | -- Error: tests/neg-custom-args/captures/usingLogFile.scala:37:9 -------------------------------------------------------
|
17 | 17 | 37 | later4.x() // error
|
18 | 18 | | ^^^^^^^^
|
19 |
| - | The expression's type {*} () -> Unit is not allowed to capture the root capability `*`. |
| 19 | + | The expression's type box {*} () -> Unit is not allowed to capture the root capability `*`. |
20 | 20 | | This usually means that a capability persists longer than its allowed lifetime.
|
21 | 21 | -- Error: tests/neg-custom-args/captures/usingLogFile.scala:47:27 ------------------------------------------------------
|
22 | 22 | 47 | val later = usingLogFile { f => () => f.write(0) } // error
|
23 | 23 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
24 |
| - | The expression's type {*} () -> Unit is not allowed to capture the root capability `*`. |
| 24 | + | The expression's type box {*} () -> Unit is not allowed to capture the root capability `*`. |
25 | 25 | | This usually means that a capability persists longer than its allowed lifetime.
|
26 | 26 | -- Error: tests/neg-custom-args/captures/usingLogFile.scala:62:25 ------------------------------------------------------
|
27 | 27 | 62 | val later = usingFile("out", f => (y: Int) => xs.foreach(x => f.write(x + y))) // error
|
28 | 28 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
29 |
| - | The expression's type {*} (x$0: Int) -> Unit is not allowed to capture the root capability `*`. |
30 |
| - | This usually means that a capability persists longer than its allowed lifetime. |
| 29 | + | The expression's type box {*} (x$0: Int) -> Unit is not allowed to capture the root capability `*`. |
| 30 | + | This usually means that a capability persists longer than its allowed lifetime. |
31 | 31 | -- Error: tests/neg-custom-args/captures/usingLogFile.scala:71:25 ------------------------------------------------------
|
32 | 32 | 71 | val later = usingFile("logfile", usingLogger(_, l => () => l.log("test"))) // error
|
33 | 33 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
34 |
| - | The expression's type {*} () -> Unit is not allowed to capture the root capability `*`. |
| 34 | + | The expression's type box {*} () -> Unit is not allowed to capture the root capability `*`. |
35 | 35 | | This usually means that a capability persists longer than its allowed lifetime.
|
0 commit comments