|  | 
| 1 |  | --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:22:11 -------------------------------------- | 
| 2 |  | -22 |    cur = (() => f.write()) :: Nil // error | 
|  | 1 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:21:11 -------------------------------------- | 
|  | 2 | +21 |    cur = (() => f.write()) :: Nil // error | 
| 3 | 3 |    |           ^^^^^^^^^^^^^^^^^^^^^^^ | 
| 4 | 4 |    |           Found:    List[box () ->{f} Unit] | 
| 5 | 5 |    |           Required: List[box () ->{xs*} Unit] | 
| 6 | 6 |    | | 
| 7 | 7 |    | longer explanation available when compiling with `-explain` | 
| 8 |  | --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:33:7 --------------------------------------- | 
| 9 |  | -33 |      (() => f.write()) :: Nil // error | 
|  | 8 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:32:7 --------------------------------------- | 
|  | 9 | +32 |      (() => f.write()) :: Nil // error | 
| 10 | 10 |    |       ^^^^^^^^^^^^^^^^^^^^^^^ | 
| 11 | 11 |    |       Found:    List[box () ->{f} Unit] | 
| 12 | 12 |    |       Required: box List[box () ->{xs*} Unit]^? | 
|  | 
| 15 | 15 |    |       cannot be included in outer capture set {xs*} of value cur | 
| 16 | 16 |    | | 
| 17 | 17 |    | longer explanation available when compiling with `-explain` | 
| 18 |  | --- Error: tests/neg-custom-args/captures/reaches.scala:38:31 ----------------------------------------------------------- | 
| 19 |  | -38 |    val next: () => Unit = cur.head // error | 
|  | 18 | +-- Error: tests/neg-custom-args/captures/reaches.scala:37:31 ----------------------------------------------------------- | 
|  | 19 | +37 |    val next: () => Unit = cur.head // error | 
| 20 | 20 |    |                           ^^^^^^^^ | 
| 21 | 21 |    |                       The expression's type box () => Unit is not allowed to capture the root capability `cap`. | 
| 22 | 22 |    |                       This usually means that a capability persists longer than its allowed lifetime. | 
| 23 |  | --- Error: tests/neg-custom-args/captures/reaches.scala:45:35 ----------------------------------------------------------- | 
| 24 |  | -45 |    val next: () => Unit = cur.get.head // error | 
|  | 23 | +-- Error: tests/neg-custom-args/captures/reaches.scala:44:35 ----------------------------------------------------------- | 
|  | 24 | +44 |    val next: () => Unit = cur.get.head // error | 
| 25 | 25 |    |                           ^^^^^^^^^^^^ | 
| 26 | 26 |    |                       The expression's type box () => Unit is not allowed to capture the root capability `cap`. | 
| 27 | 27 |    |                       This usually means that a capability persists longer than its allowed lifetime. | 
| 28 |  | --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:53:2 --------------------------------------- | 
| 29 |  | -53 |  val id: Id[Proc, Proc] = new Id[Proc, () -> Unit] // error | 
|  | 28 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:52:2 --------------------------------------- | 
|  | 29 | +52 |  val id: Id[Proc, Proc] = new Id[Proc, () -> Unit] // error | 
| 30 | 30 |    |  ^ | 
| 31 | 31 |    |  Found:    box () => Unit | 
| 32 | 32 |    |  Required: () => Unit | 
| 33 | 33 |    | | 
| 34 | 34 |    |  Note that box () => Unit cannot be box-converted to () => Unit | 
| 35 | 35 |    |  since at least one of their capture sets contains the root capability `cap` | 
| 36 |  | -54 |  usingFile: f => | 
| 37 |  | -55 |    id(() => f.write()) | 
|  | 36 | +53 |  usingFile: f => | 
|  | 37 | +54 |    id(() => f.write()) | 
| 38 | 38 |    | | 
| 39 | 39 |    | longer explanation available when compiling with `-explain` | 
| 40 |  | --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:62:27 -------------------------------------- | 
| 41 |  | -62 |    val f1: File^{id*} = id(f) // error, since now id(f): File^ // error | 
|  | 40 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:61:27 -------------------------------------- | 
|  | 41 | +61 |    val f1: File^{id*} = id(f) // error, since now id(f): File^ // error | 
| 42 | 42 |    |                         ^^^^^ | 
| 43 | 43 |    |                         Found:    File^{f} | 
| 44 | 44 |    |                         Required: File^{id*} | 
| 45 | 45 |    | | 
| 46 | 46 |    | longer explanation available when compiling with `-explain` | 
| 47 |  | --- Error: tests/neg-custom-args/captures/reaches.scala:61:31 ----------------------------------------------------------- | 
| 48 |  | -61 |  val leaked = usingFile[File^{id*}]: f => // error | 
|  | 47 | +-- Error: tests/neg-custom-args/captures/reaches.scala:60:31 ----------------------------------------------------------- | 
|  | 48 | +60 |  val leaked = usingFile[File^{id*}]: f => // error | 
| 49 | 49 |    |                               ^^^ | 
| 50 | 50 |    |                               id* cannot be tracked since its capture set is empty | 
| 51 |  | --- Error: tests/neg-custom-args/captures/reaches.scala:62:18 ----------------------------------------------------------- | 
| 52 |  | -62 |    val f1: File^{id*} = id(f) // error, since now id(f): File^ // error | 
|  | 51 | +-- Error: tests/neg-custom-args/captures/reaches.scala:61:18 ----------------------------------------------------------- | 
|  | 52 | +61 |    val f1: File^{id*} = id(f) // error, since now id(f): File^ // error | 
| 53 | 53 |    |                  ^^^ | 
| 54 | 54 |    |                  id* cannot be tracked since its capture set is empty | 
0 commit comments