|
36 | 36 | | Note that capability <cap of (x: A^): B^> is not included in capture set {cap}.
|
37 | 37 | |
|
38 | 38 | | longer explanation available when compiling with `-explain`
|
| 39 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:12:20 ---------------------------------- |
| 40 | +12 | val _: A^ -> B^ = x => g(x) // error: g is no longer pure, since it contains the ^ of B |
| 41 | + | ^^^^^^^^^ |
| 42 | + | Found: (x: A^) ->{g} B^{g*} |
| 43 | + | Required: A^ -> B^² |
| 44 | + | |
| 45 | + | where: ^ refers to the universal root capability |
| 46 | + | ^² refers to a fresh root capability in the type of value _$5 |
| 47 | + | |
| 48 | + | Note that capability (g : A^ -> B^) is not included in capture set {}. |
| 49 | + | |
| 50 | + | longer explanation available when compiling with `-explain` |
39 | 51 | -- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:13:25 ----------------------------------
|
40 | 52 | 13 | val _: (x: A^) -> B^ = x => f(x) // error: existential in B cannot subsume `x` since `x` is not shared
|
41 | 53 | | ^^^^^^^^^
|
|
63 | 75 | -- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:17:24 ----------------------------------
|
64 | 76 | 17 | val _: (x: S) -> B^ = (x: S) => h(x) // error: eta expansion fails
|
65 | 77 | | ^^^^^^^^^^^^^^
|
66 |
| - | Found: (x: S^{cap.rd}) ->? B^{h*} |
| 78 | + | Found: (x: S^{cap.rd}) ->{h} B^{h*} |
67 | 79 | | Required: (x: S^{cap.rd}) -> B^
|
68 | 80 | |
|
69 | 81 | | where: ^ refers to a root capability associated with the result type of (x: S^{cap.rd}): B^
|
70 | 82 | | cap is the universal root capability
|
71 | 83 | |
|
72 |
| - | Note that capability h* is not included in capture set {<cap of (x: S^{cap.rd}): B^{h*}>}. |
| 84 | + | Note that capability (h : S -> B^) is not included in capture set {}. |
73 | 85 | |
|
74 | 86 | | longer explanation available when compiling with `-explain`
|
75 |
| --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:26:19 ---------------------------------- |
76 |
| -26 | val _: S -> B^ = j // error |
| 87 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:21:23 ---------------------------------- |
| 88 | +21 | val _: (x: S) -> S = (x: S) => h2(x) // error: eta conversion fails since `h2` is now impure (result type S is a capability) |
| 89 | + | ^^^^^^^^^^^^^^^ |
| 90 | + | Found: (x: S^{cap.rd}) ->{h2} S^{h2*.rd} |
| 91 | + | Required: (x: S^{cap.rd}) -> S^{cap².rd} |
| 92 | + | |
| 93 | + | where: cap is the universal root capability |
| 94 | + | cap² is a root capability associated with the result type of (x: S^{cap.rd}): S^{cap².rd} |
| 95 | + | |
| 96 | + | Note that capability (h2 : S -> S) is not included in capture set {}. |
| 97 | + | |
| 98 | + | longer explanation available when compiling with `-explain` |
| 99 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:27:19 ---------------------------------- |
| 100 | +27 | val _: S -> B^ = j // error |
77 | 101 | | ^
|
78 | 102 | | Found: (j : (x: S) -> B^)
|
79 | 103 | | Required: S^{cap.rd} -> B^²
|
80 | 104 | |
|
81 | 105 | | where: ^ refers to a root capability associated with the result type of (x: S^{cap.rd}): B^
|
82 |
| - | ^² refers to a fresh root capability in the type of value _$13 |
| 106 | + | ^² refers to a fresh root capability in the type of value _$14 |
83 | 107 | | cap is the universal root capability
|
84 | 108 | |
|
85 | 109 | | Note that capability <cap of (x: S^{cap.rd}): B^> is not included in capture set {cap}.
|
86 | 110 | |
|
87 | 111 | | longer explanation available when compiling with `-explain`
|
88 |
| --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:27:19 ---------------------------------- |
89 |
| -27 | val _: S -> B^ = x => j(x) // error |
| 112 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:28:19 ---------------------------------- |
| 113 | +28 | val _: S -> B^ = x => j(x) // error |
90 | 114 | | ^^^^^^^^^
|
91 | 115 | | Found: (x: S^{cap.rd}) ->? B^{x}
|
92 | 116 | | Required: S^{cap.rd} -> B^
|
93 | 117 | |
|
94 |
| - | where: ^ refers to a fresh root capability in the type of value _$14 |
| 118 | + | where: ^ refers to a fresh root capability in the type of value _$15 |
95 | 119 | | cap is the universal root capability
|
96 | 120 | |
|
97 | 121 | | Note that capability x.type is not included in capture set {cap}.
|
|
0 commit comments