|
1 |
| --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/lazylists2.scala:18:4 ------------------------------------ |
2 |
| -18 | final class Mapped extends LazyList[B]: // error |
3 |
| - | ^ |
| 1 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/lazylists2.scala:24:4 ------------------------------------ |
| 2 | +24 | new Mapped // error |
| 3 | + | ^^^^^^^^^^ |
4 | 4 | | Found: LazyList[B^'s1]^{f, xs}
|
5 | 5 | | Required: LazyList[B]^{f}
|
6 | 6 | |
|
7 | 7 | | Note that capability xs is not included in capture set {f}.
|
8 |
| -19 | this: (Mapped^{xs, f}) => |
9 |
| -20 | def isEmpty = false |
10 |
| -21 | def head: B = f(xs.head) |
11 |
| -22 | def tail: LazyList[B]^{this} = xs.tail.map(f) |
12 |
| -23 | new Mapped |
13 | 8 | |
|
14 | 9 | | longer explanation available when compiling with `-explain`
|
15 |
| --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/lazylists2.scala:27:4 ------------------------------------ |
16 |
| -27 | final class Mapped extends LazyList[B]: // error |
17 |
| - | ^ |
| 10 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/lazylists2.scala:33:4 ------------------------------------ |
| 11 | +33 | new Mapped // error |
| 12 | + | ^^^^^^^^^^ |
18 | 13 | | Found: LazyList[B^'s2]^{f, xs}
|
19 | 14 | | Required: LazyList[B]^{xs}
|
20 | 15 | |
|
21 | 16 | | Note that capability f is not included in capture set {xs}.
|
22 |
| -28 | this: Mapped^{xs, f} => |
23 |
| -29 | def isEmpty = false |
24 |
| -30 | def head: B = f(xs.head) |
25 |
| -31 | def tail: LazyList[B]^{this} = xs.tail.map(f) |
26 |
| -32 | new Mapped |
27 | 17 | |
|
28 | 18 | | longer explanation available when compiling with `-explain`
|
29 | 19 | -- Error: tests/neg-custom-args/captures/lazylists2.scala:40:20 --------------------------------------------------------
|
|
34 | 24 | 41 | def tail: LazyList[B]^{this}= xs.tail.map(f) // error
|
35 | 25 | | ^
|
36 | 26 | | reference (f : A => B) is not included in the allowed capture set {xs} of the self type of class Mapped
|
37 |
| --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/lazylists2.scala:45:4 ------------------------------------ |
38 |
| -45 | final class Mapped extends LazyList[B]: // error |
39 |
| - | ^ |
| 27 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/lazylists2.scala:51:4 ------------------------------------ |
| 28 | +51 | new Mapped // error |
| 29 | + | ^^^^^^^^^^ |
40 | 30 | | Found: LazyList[B^'s3]^{f, xs}
|
41 | 31 | | Required: LazyList[B]^{xs}
|
42 | 32 | |
|
43 | 33 | | Note that capability f is not included in capture set {xs}.
|
44 |
| -46 | this: (Mapped^{xs, f}) => |
45 |
| -47 | def isEmpty = false |
46 |
| -48 | def head: B = f(xs.head) |
47 |
| -49 | def tail: LazyList[B]^{xs, f} = xs.tail.map(f) |
48 |
| -50 | new Mapped |
49 | 34 | |
|
50 | 35 | | longer explanation available when compiling with `-explain`
|
51 | 36 | -- Error: tests/neg-custom-args/captures/lazylists2.scala:60:10 --------------------------------------------------------
|
52 | 37 | 60 | class Mapped2 extends Mapped: // error
|
53 | 38 | | ^
|
54 | 39 | | references {f, xs} are not all included in the allowed capture set {} of the self type of class Mapped2
|
55 | 40 | 61 | this: Mapped =>
|
| 41 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/lazylists2.scala:62:4 ------------------------------------ |
| 42 | +62 | new Mapped2 // error |
| 43 | + | ^^^^^^^^^^^ |
| 44 | + | Found: LazyList[B^'s4]^{f, xs} |
| 45 | + | Required: LazyList[B] |
| 46 | + | |
| 47 | + | Note that capability f is not included in capture set {}. |
| 48 | + | |
| 49 | + | longer explanation available when compiling with `-explain` |
0 commit comments