|
49 | 49 | -- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:12:20 ---------------------------------- |
50 | 50 | 12 | val _: A^ -> B^ = x => g(x) // error: g is no longer pure, since it contains the ^ of B |
51 | 51 | | ^^^^^^^^^ |
52 | | - | Found: (x: A^) ->{g} B^² |
| 52 | + | Found: (x: A^) ->'s1 B^² |
53 | 53 | | Required: A^ -> B^³ |
54 | 54 | | |
55 | | - | Note that capability g is not included in capture set {}. |
| 55 | + | Note that capability cap is not included in capture set {cap²} |
| 56 | + | because cap is not visible from cap² in value _$5. |
56 | 57 | | |
57 | | - | where: ^ refers to the universal root capability |
58 | | - | ^² refers to a root capability associated with the result type of (x: A^): B^² |
59 | | - | ^³ refers to a fresh root capability in the type of value _$5 |
| 58 | + | where: ^ refers to the universal root capability |
| 59 | + | ^² refers to a root capability associated with the result type of (x: A^): B^² |
| 60 | + | ^³ refers to a fresh root capability in the type of value _$5 |
| 61 | + | cap is a root capability associated with the result type of (x: A^): B^² |
| 62 | + | cap² is a fresh root capability in the type of value _$5 |
60 | 63 | | |
61 | 64 | | longer explanation available when compiling with `-explain` |
62 | 65 | -- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:16:24 ---------------------------------- |
|
75 | 78 | | cap is a root capability associated with the result type of (x: S^): B^² |
76 | 79 | | |
77 | 80 | | longer explanation available when compiling with `-explain` |
78 | | --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:17:24 ---------------------------------- |
79 | | -17 | val _: (x: S) -> B^ = (x: S) => h(x) // error: eta expansion fails |
80 | | - | ^^^^^^^^^^^^^^ |
81 | | - | Found: (x: S^) ->{h} B^² |
82 | | - | Required: (x: S^) -> B^³ |
83 | | - | |
84 | | - | Note that capability h is not included in capture set {}. |
85 | | - | |
86 | | - | where: ^ refers to the universal root capability |
87 | | - | ^² refers to a root capability associated with the result type of (x: S^): B^² |
88 | | - | ^³ refers to a root capability associated with the result type of (x: S^): B^³ |
89 | | - | |
90 | | - | longer explanation available when compiling with `-explain` |
91 | | --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:21:23 ---------------------------------- |
92 | | -21 | val _: (x: S) -> S = (x: S) => h2(x) // error: eta conversion fails since `h2` is now impure (result type S is a capability) |
93 | | - | ^^^^^^^^^^^^^^^ |
94 | | - | Found: (x: S^) ->{h2} S^² |
95 | | - | Required: (x: S^) -> S^³ |
96 | | - | |
97 | | - | Note that capability h2 is not included in capture set {}. |
98 | | - | |
99 | | - | where: ^ refers to the universal root capability |
100 | | - | ^² refers to a root capability associated with the result type of (x: S^): S^² |
101 | | - | ^³ refers to a root capability associated with the result type of (x: S^): S^³ |
102 | | - | |
103 | | - | longer explanation available when compiling with `-explain` |
104 | | --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:27:19 ---------------------------------- |
105 | | -27 | val _: S -> B^ = j // error |
| 81 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:26:19 ---------------------------------- |
| 82 | +26 | val _: S -> B^ = j // error |
106 | 83 | | ^ |
107 | 84 | | Found: (j : (x: S) -> B^) |
108 | 85 | | Required: S^² -> B^³ |
109 | 86 | | |
110 | 87 | | Note that capability cap is not included in capture set {cap²} |
111 | | - | because cap is not visible from cap² in value _$14. |
| 88 | + | because cap is not visible from cap² in value _$13. |
112 | 89 | | |
113 | 90 | | where: ^ refers to a root capability associated with the result type of (x: S^²): B^ |
114 | 91 | | ^² refers to the universal root capability |
115 | | - | ^³ refers to a fresh root capability in the type of value _$14 |
| 92 | + | ^³ refers to a fresh root capability in the type of value _$13 |
116 | 93 | | cap is a root capability associated with the result type of (x: S^²): B^ |
117 | | - | cap² is a fresh root capability in the type of value _$14 |
| 94 | + | cap² is a fresh root capability in the type of value _$13 |
118 | 95 | | |
119 | 96 | | longer explanation available when compiling with `-explain` |
120 | | --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:28:19 ---------------------------------- |
121 | | -28 | val _: S -> B^ = x => j(x) // error |
| 97 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:27:19 ---------------------------------- |
| 98 | +27 | val _: S -> B^ = x => j(x) // error |
122 | 99 | | ^^^^^^^^^ |
123 | | - | Found: (x: S^) ->'s1 B^² |
| 100 | + | Found: (x: S^) ->'s2 B^² |
124 | 101 | | Required: S^ -> B^³ |
125 | 102 | | |
126 | 103 | | Note that capability cap is not included in capture set {cap²} |
127 | | - | because cap is not visible from cap² in value _$15. |
| 104 | + | because cap is not visible from cap² in value _$14. |
128 | 105 | | |
129 | 106 | | where: ^ refers to the universal root capability |
130 | 107 | | ^² refers to a root capability associated with the result type of (x: S^): B^² |
131 | | - | ^³ refers to a fresh root capability in the type of value _$15 |
| 108 | + | ^³ refers to a fresh root capability in the type of value _$14 |
132 | 109 | | cap is a root capability associated with the result type of (x: S^): B^² |
133 | | - | cap² is a fresh root capability in the type of value _$15 |
| 110 | + | cap² is a fresh root capability in the type of value _$14 |
134 | 111 | | |
135 | 112 | | longer explanation available when compiling with `-explain` |
0 commit comments