|
1 |
| --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:22:11 -------------------------------------- |
2 |
| -22 | cur = (() => f.write()) :: Nil // error since {f*} !<: {xs*} |
| 1 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:21:11 -------------------------------------- |
| 2 | +21 | cur = (() => f.write()) :: Nil // error since {f*} !<: {xs*} |
3 | 3 | | ^^^^^^^^^^^^^^^^^^^^^^^
|
4 | 4 | | Found: List[box () ->{f} Unit]
|
5 | 5 | | Required: List[box () ->{xs*} Unit]
|
6 | 6 | |
|
7 | 7 | | longer explanation available when compiling with `-explain`
|
8 |
| --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:33:7 --------------------------------------- |
9 |
| -33 | (() => f.write()) :: Nil // error since {f*} !<: {xs*} |
| 8 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:32:7 --------------------------------------- |
| 9 | +32 | (() => f.write()) :: Nil // error since {f*} !<: {xs*} |
10 | 10 | | ^^^^^^^^^^^^^^^^^^^^^^^
|
11 | 11 | | Found: List[box () ->{f} Unit]
|
12 | 12 | | Required: box List[box () ->{xs*} Unit]^?
|
|
15 | 15 | | cannot be included in outer capture set {xs*} of value cur which is associated with method runAll1
|
16 | 16 | |
|
17 | 17 | | longer explanation available when compiling with `-explain`
|
18 |
| --- Error: tests/neg-custom-args/captures/reaches.scala:36:6 ------------------------------------------------------------ |
19 |
| -36 | var cur: List[Proc] = xs // error: Illegal type for var |
| 18 | +-- Error: tests/neg-custom-args/captures/reaches.scala:35:6 ------------------------------------------------------------ |
| 19 | +35 | var cur: List[Proc] = xs // error: Illegal type for var |
20 | 20 | | ^
|
21 | 21 | | Mutable variable cur cannot have type List[box () => Unit] since
|
22 | 22 | | the part box () => Unit of that type captures the root capability `cap`.
|
23 |
| --- Error: tests/neg-custom-args/captures/reaches.scala:43:15 ----------------------------------------------------------- |
24 |
| -43 | val cur = Ref[List[Proc]](xs) // error: illegal type for type argument to Ref |
| 23 | +-- Error: tests/neg-custom-args/captures/reaches.scala:42:15 ----------------------------------------------------------- |
| 24 | +42 | val cur = Ref[List[Proc]](xs) // error: illegal type for type argument to Ref |
25 | 25 | | ^^^^^^^^^^^^^^^
|
26 | 26 | | Sealed type variable T cannot be instantiated to List[box () => Unit] since
|
27 | 27 | | the part box () => Unit of that type captures the root capability `cap`.
|
28 | 28 | | This is often caused by a local capability in an argument of constructor Ref
|
29 | 29 | | leaking as part of its result.
|
30 |
| --- Error: tests/neg-custom-args/captures/reaches.scala:53:31 ----------------------------------------------------------- |
31 |
| -53 | val id: Id[Proc, Proc] = new Id[Proc, () -> Unit] // error |
| 30 | +-- Error: tests/neg-custom-args/captures/reaches.scala:52:31 ----------------------------------------------------------- |
| 31 | +52 | val id: Id[Proc, Proc] = new Id[Proc, () -> Unit] // error |
32 | 32 | | ^^^^^^^^^^^^^^^^^^^^
|
33 | 33 | | Sealed type variable A cannot be instantiated to box () => Unit since
|
34 | 34 | | that type captures the root capability `cap`.
|
35 | 35 | | This is often caused by a local capability in an argument of constructor Id
|
36 | 36 | | leaking as part of its result.
|
| 37 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:60:27 -------------------------------------- |
| 38 | +60 | val f1: File^{id*} = id(f) // error |
| 39 | + | ^^^^^ |
| 40 | + | Found: File^{id, f} |
| 41 | + | Required: File^{id*} |
| 42 | + | |
| 43 | + | longer explanation available when compiling with `-explain` |
0 commit comments