|
1 |
| --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/boundary.scala:8:31 -------------------------------------- |
2 |
| -8 | boundary.break(l2)(using l1) // error |
3 |
| - | ^^ |
4 |
| - | Found: (local : scala.util.boundary.Label[scala.util.boundary.Label[Unit]]^) |
5 |
| - | Required: scala.util.boundary.Label[box scala.util.boundary.Label[Unit]^{local²}]^ |
6 |
| - | |
7 |
| - | where: local is a value locally defined in object test |
8 |
| - | local² is a value locally defined in object test |
9 |
| - | |
10 |
| - | longer explanation available when compiling with `-explain` |
11 |
| --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/boundary.scala:6:32 -------------------------------------- |
12 |
| - 6 | boundary[boundary.Label[Unit]]: l1 ?=> // error |
| 1 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/boundary.scala:5:4 --------------------------------------- |
| 2 | + 4 | boundary[AnyRef^]: |
| 3 | + 5 | l1 ?=> // error // error |
13 | 4 | | ^
|
14 |
| - | Found: scala.util.boundary.Break[scala.util.boundary.Label[Unit]] @unchecked |
15 |
| - | Required: scala.util.boundary.Break[box scala.util.boundary.Label[Unit]^] @unchecked |
16 |
| - 7 | boundary[Unit]: l2 ?=> |
17 |
| - 8 | boundary.break(l2)(using l1) // error |
18 |
| - 9 | ??? |
| 5 | + |Found: scala.util.boundary.Label[Object^?]^{cap.rd} |
| 6 | + |Required: scala.util.boundary.Label[Object^]^² |
| 7 | + | |
| 8 | + |where: ^ refers to the universal root capability |
| 9 | + | ^² refers to a fresh root capability classified as Control in the type of value local |
| 10 | + | cap is a fresh root capability classified as Control created in value local when constructing Capability instance scala.util.boundary.Label[Object^?] |
| 11 | + | |
| 12 | + |Note that capability cap |
| 13 | + |cannot be included in outer capture set ?. |
| 14 | + 6 | boundary[Unit]: l2 ?=> |
| 15 | + 7 | boundary.break(l2)(using l1) |
| 16 | + 8 | ??? |
| 17 | + |-------------------------------------------------------------------------------------------------------------------- |
| 18 | + |Inline stack trace |
| 19 | + |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 20 | + |This location contains code that was inlined from boundary.scala:70 |
| 21 | +70 | val local = Label[T]() |
| 22 | + | ^^^^^^^^^^ |
| 23 | + -------------------------------------------------------------------------------------------------------------------- |
| 24 | + | |
| 25 | + | longer explanation available when compiling with `-explain` |
| 26 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/boundary.scala:5:4 --------------------------------------- |
| 27 | + 4 | boundary[AnyRef^]: |
| 28 | + 5 | l1 ?=> // error // error |
| 29 | + | ^ |
| 30 | + | Found: scala.util.boundary.Break[AnyRef^] @unchecked |
| 31 | + | Required: scala.util.boundary.Break[Object^²] @unchecked |
| 32 | + | |
| 33 | + | where: ^ refers to the universal root capability |
| 34 | + | ^² refers to a fresh root capability created in package <empty> |
| 35 | + | |
| 36 | + | Note that capability cap is not included in capture set {cap}. |
| 37 | + 6 | boundary[Unit]: l2 ?=> |
| 38 | + 7 | boundary.break(l2)(using l1) |
| 39 | + 8 | ??? |
19 | 40 | |--------------------------------------------------------------------------------------------------------------------
|
20 | 41 | |Inline stack trace
|
21 | 42 | |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
22 |
| - |This location contains code that was inlined from boundary.scala:73 |
23 |
| -73 | catch case ex: Break[T] @unchecked => |
| 43 | + |This location contains code that was inlined from boundary.scala:72 |
| 44 | +72 | catch case ex: Break[T] @unchecked => |
24 | 45 | | ^
|
25 | 46 | --------------------------------------------------------------------------------------------------------------------
|
26 | 47 | |
|
|
0 commit comments