File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
compiler/src/dotty/tools/dotc/printing
tests/neg-custom-args/captures Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
208
208
else if ctx.settings.YccDebug .value then
209
209
changePrec(GlobalPrec )(box ~ refs.show ~ " " ~ toText(parent))
210
210
else if ! refs.isConst && refs.elems.isEmpty then
211
- changePrec(GlobalPrec )(" ?" ~ " " ~ toText(parent))
211
+ changePrec(GlobalPrec )(box ~ " ?" ~ " " ~ toText(parent))
212
212
else if Config .printCaptureSetsAsPrefix then
213
213
changePrec(GlobalPrec )(box ~ toText(refs) ~ " " ~ toText(parent))
214
214
else
Original file line number Diff line number Diff line change 1
1
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/boxmap.scala:12:2 ----------------------------------------
2
2
12 | () => b[Box[B]]((x: A) => box(f(x))) // error
3
3
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4
- | Found: {f} () -> ? Box[? B]
4
+ | Found: {f} () -> ? Box[box ? B]
5
5
| Required: () -> Box[B]
6
6
|
7
7
| longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change 37
37
17 | def tail = xs() // error: cannot have an inferred type
38
38
| ^^^^^^^^^^^^^^^
39
39
| Non-local method tail cannot have an inferred result type
40
- | {LazyCons.this.xs} lazylists.LazyList[? T]
40
+ | {LazyCons.this.xs} lazylists.LazyList[box ? T]
41
41
| with non-empty capture set {LazyCons.this.xs}.
42
42
| The type needs to be declared explicitly.
Original file line number Diff line number Diff line change 8
8
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/lazylists2.scala:18:4 ------------------------------------
9
9
18 | final class Mapped extends LazyList[B]: // error
10
10
| ^
11
- | Found: {f, xs} LazyList[? B]
11
+ | Found: {f, xs} LazyList[box ? B]
12
12
| Required: {f} LazyList[B]
13
13
19 | this: ({xs, f} Mapped) =>
14
14
20 | def isEmpty = false
20
20
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/lazylists2.scala:27:4 ------------------------------------
21
21
27 | final class Mapped extends LazyList[B]: // error
22
22
| ^
23
- | Found: {f, xs} LazyList[? B]
23
+ | Found: {f, xs} LazyList[box ? B]
24
24
| Required: {xs} LazyList[B]
25
25
28 | this: ({xs, f} Mapped) =>
26
26
29 | def isEmpty = false
You can’t perform that action at this time.
0 commit comments