|
13 | 13 | -- Error: tests/neg-custom-args/captures/usingLogFile.scala:23:14 ------------------------------------------------------
|
14 | 14 | 23 | val later = usingLogFile { f => () => f.write(0) } // error
|
15 | 15 | | ^^^^^^^^^^^^
|
16 |
| - | Sealed type variable T cannot be instantiated to box () => Unit since |
| 16 | + | Sealed type variable T cannot be instantiated to box () => Unit since |
17 | 17 | | that type captures the root capability `cap`.
|
18 |
| - | This is often caused by a local capability in the body of method usingLogFile |
| 18 | + | This is often caused by a local capability in an argument of method usingLogFile |
19 | 19 | | leaking as part of its result.
|
20 | 20 | -- Error: tests/neg-custom-args/captures/usingLogFile.scala:28:23 ------------------------------------------------------
|
21 | 21 | 28 | private val later2 = usingLogFile { f => Cell(() => f.write(0)) } // error
|
22 | 22 | | ^^^^^^^^^^^^
|
23 |
| - | Sealed type variable T cannot be instantiated to box Test2.Cell[() => Unit]^? since |
| 23 | + | Sealed type variable T cannot be instantiated to box Test2.Cell[() => Unit]^? since |
24 | 24 | | the part () => Unit of that type captures the root capability `cap`.
|
25 |
| - | This is often caused by a local capability in the body of method usingLogFile |
| 25 | + | This is often caused by a local capability in an argument of method usingLogFile |
26 | 26 | | leaking as part of its result.
|
27 | 27 | -- Error: tests/neg-custom-args/captures/usingLogFile.scala:47:6 -------------------------------------------------------
|
28 | 28 | 47 | val later = usingLogFile { f => () => f.write(0) } // error
|
|
34 | 34 | -- Error: tests/neg-custom-args/captures/usingLogFile.scala:62:16 ------------------------------------------------------
|
35 | 35 | 62 | val later = usingFile("out", f => (y: Int) => xs.foreach(x => f.write(x + y))) // error
|
36 | 36 | | ^^^^^^^^^
|
37 |
| - | Sealed type variable T cannot be instantiated to box (x$0: Int) => Unit since |
| 37 | + | Sealed type variable T cannot be instantiated to box (x$0: Int) => Unit since |
38 | 38 | | that type captures the root capability `cap`.
|
39 |
| - | This is often caused by a local capability in the body of method usingFile |
| 39 | + | This is often caused by a local capability in an argument of method usingFile |
40 | 40 | | leaking as part of its result.
|
41 | 41 | -- Error: tests/neg-custom-args/captures/usingLogFile.scala:71:16 ------------------------------------------------------
|
42 | 42 | 71 | val later = usingFile("logfile", // error
|
43 | 43 | | ^^^^^^^^^
|
44 |
| - | Sealed type variable T cannot be instantiated to box () => Unit since |
| 44 | + | Sealed type variable T cannot be instantiated to box () => Unit since |
45 | 45 | | that type captures the root capability `cap`.
|
46 |
| - | This is often caused by a local capability in the body of method usingFile |
| 46 | + | This is often caused by a local capability in an argument of method usingFile |
47 | 47 | | leaking as part of its result.
|
0 commit comments