|
1 | 1 | -- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i15923.scala:27:23 --------------------------------------- |
2 | 2 | 27 | val leak = withCap(cap => mkId(cap)) // error (was: no error here since type aliases don't box) |
3 | 3 | | ^^^^^^^^^^^^^^^^ |
4 | | - |Found: (cap: test2.Cap^'s1) ->'s2 [T] => (op: test2.Cap^'s3 ->'s4 T) ->'s5 T |
5 | | - |Required: test2.Cap^{lcap} => [T] => (op: test2.Cap^'s6 ->'s7 T) ->'s8 T |
| 4 | + |Found: (lcap: scala.caps.Capability^) ?->'s1 test2.Cap^{lcap} => [T] => (op: test2.Cap^{lcap} ->'s2 T) ->'s3 T |
| 5 | + |Required: (lcap: scala.caps.Capability^) ?-> test2.Cap^{lcap} =>² [T] => (op: test2.Cap^{lcap²} ->'s2 T) ->'s3 T |
6 | 6 | | |
7 | | - |Note that capability lcap cannot be included in outer capture set 's1 of parameter cap. |
| 7 | + |Note that capability lcap cannot be included in outer capture set {lcap²}. |
8 | 8 | | |
9 | | - |where: => refers to a fresh root capability created in anonymous function of type (using lcap: scala.caps.Capability): test2.Cap^{lcap} -> [T] => (op: test2.Cap^{lcap} => T) -> T when instantiating expected result type test2.Cap^{lcap} ->{cap²} [T] => (op: test2.Cap^'s6 ->'s7 T) ->'s8 T of function literal |
| 9 | + |where: => refers to a root capability associated with the result type of (using lcap: scala.caps.Capability^): test2.Cap^{lcap} => [T] => (op: test2.Cap^{lcap} ->'s2 T) ->'s3 T |
| 10 | + | =>² refers to a root capability associated with the result type of (using lcap: scala.caps.Capability^): test2.Cap^{lcap} =>² [T] => (op: test2.Cap^{lcap²} ->'s2 T) ->'s3 T |
| 11 | + | ^ refers to the universal root capability |
| 12 | + | lcap is a reference to a value parameter |
| 13 | + | lcap² is a parameter in an anonymous function in method bar |
10 | 14 | | |
11 | 15 | | longer explanation available when compiling with `-explain` |
12 | 16 | -- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i15923.scala:12:21 --------------------------------------- |
13 | 17 | 12 | val leak = withCap(cap => mkId(cap)) // error |
14 | 18 | | ^^^^^^^^^^^^^^^^ |
15 | | - |Found: (cap: Cap^'s9) ->'s10 Id[Cap^'s11]^'s12 |
16 | | - |Required: Cap^{lcap} => Id[Cap^'s13]^'s14 |
| 19 | + |Found: (lcap: scala.caps.Capability^) ?->'s4 Cap^{lcap} => Id[Cap^{lcap}]^'s5 |
| 20 | + |Required: (lcap: scala.caps.Capability^) ?-> Cap^{lcap} =>² Id[Cap^{lcap²}]^'s5 |
17 | 21 | | |
18 | | - |Note that capability lcap cannot be included in outer capture set 's9 of parameter cap. |
| 22 | + |Note that capability lcap² is not included in capture set {lcap}. |
19 | 23 | | |
20 | | - |where: => refers to a fresh root capability created in anonymous function of type (using lcap: scala.caps.Capability): Cap^{lcap} -> Id[Cap] when instantiating expected result type Cap^{lcap} ->{cap²} Id[Cap^'s13]^'s14 of function literal |
| 24 | + |where: => refers to a root capability associated with the result type of (using lcap: scala.caps.Capability^): Cap^{lcap} => Id[Cap^{lcap}]^'s5 |
| 25 | + | =>² refers to a root capability associated with the result type of (using lcap: scala.caps.Capability^): Cap^{lcap} =>² Id[Cap^{lcap²}]^'s5 |
| 26 | + | ^ refers to the universal root capability |
| 27 | + | lcap is a reference to a value parameter |
| 28 | + | lcap² is a parameter in an anonymous function in method bar |
21 | 29 | | |
22 | 30 | | longer explanation available when compiling with `-explain` |
0 commit comments