|
1 | 1 | -- [E007] Type Mismatch Error: tests/neg-custom-args/captures/depfun-reach.scala:12:27 --------------------------------- |
2 | 2 | 12 | List(() => op.foreach((f,g) => { f(); g() })) // error (???) |
3 | 3 | | ^^^^^^^^^^^^^^^^^^^^ |
4 | | - |Found: (x$1: (box () ->? Unit, box () ->? Unit)^?) ->? Unit |
5 | | - |Required: ((box () ->{op*} Unit, box () ->{op*} Unit)) => Unit |
| 4 | + |Found: (x$1: (() ->? Unit, () ->? Unit)^?) ->? Unit |
| 5 | + |Required: ((() ->{op*} Unit, () ->{op*} Unit)) => Unit |
6 | 6 | | |
7 | 7 | |where: => refers to a fresh root capability created in anonymous function of type (): Unit when checking argument to parameter op of method foreach |
8 | 8 | | |
9 | 9 | | longer explanation available when compiling with `-explain` |
10 | 10 | -- [E007] Type Mismatch Error: tests/neg-custom-args/captures/depfun-reach.scala:19:4 ---------------------------------- |
11 | 11 | 19 | op // error |
12 | 12 | | ^^ |
13 | | - | Found: (op : (xs: List[(X, box () ->{io} Unit)]) => List[box () ->{xs*} Unit]) |
14 | | - | Required: (xs: List[(X, box () ->{io} Unit)]) =>² List[() -> Unit] |
| 13 | + | Found: (op : (xs: List[(X, () ->{io} Unit)]) => List[() ->{xs*} Unit]) |
| 14 | + | Required: (xs: List[(X, () ->{io} Unit)]) =>² List[() -> Unit] |
15 | 15 | | |
16 | 16 | | where: => refers to a fresh root capability in the type of parameter op |
17 | 17 | | =>² refers to a fresh root capability in the result type of method foo |
|
20 | 20 | -- [E007] Type Mismatch Error: tests/neg-custom-args/captures/depfun-reach.scala:26:60 --------------------------------- |
21 | 21 | 26 | val b: (xs: List[() ->{io} Unit]) => List[() ->{} Unit] = a // error |
22 | 22 | | ^ |
23 | | - | Found: (a : (xs: List[box () ->{io} Unit]) => List[box () ->{xs*} Unit]) |
24 | | - | Required: (xs: List[box () ->{io} Unit]) =>² List[() -> Unit] |
| 23 | + | Found: (a : (xs: List[() ->{io} Unit]) => List[() ->{xs*} Unit]) |
| 24 | + | Required: (xs: List[() ->{io} Unit]) =>² List[() -> Unit] |
25 | 25 | | |
26 | | - | where: => refers to a fresh root capability in the type of value a |
27 | | - | =>² refers to a fresh root capability in the type of value b |
| 26 | + | where: => refers to a fresh root capability in the type of value a |
| 27 | + | =>² refers to a fresh root capability in the type of value b |
28 | 28 | | |
29 | 29 | | longer explanation available when compiling with `-explain` |
30 | 30 | -- Error: tests/neg-custom-args/captures/depfun-reach.scala:18:17 ------------------------------------------------------ |
31 | 31 | 18 | : (xs: List[(X, () ->{io} Unit)]) => List[() ->{} Unit] = // error |
32 | 32 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
33 | | - |Separation failure: method foo's result type (xs: List[(X, box () ->{io} Unit)]) => List[() -> Unit] hides parameter op. |
| 33 | + |Separation failure: method foo's result type (xs: List[(X, () ->{io} Unit)]) => List[() -> Unit] hides parameter op. |
34 | 34 | |The parameter needs to be annotated with @consume to allow this. |
0 commit comments