File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
compiler/src/dotty/tools/dotc/cc
tests/neg-custom-args/captures Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ extends tpd.TreeTraverser:
209
209
else
210
210
tp.derivedAppliedType(tycon1, args1 :+ res1)
211
211
else
212
- tp.derivedAppliedType(tycon1, args.mapConserve(arg => box( this (arg) )))
212
+ tp.derivedAppliedType(tycon1, args.mapConserve(arg => this (arg)))
213
213
case tp @ RefinedType (core, rname, rinfo) if defn.isFunctionType(tp) =>
214
214
val rinfo1 = apply(rinfo)
215
215
if rinfo1 ne rinfo then rinfo1.toFunctionType(isJava = false , alwaysDependent = true )
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[box ? T]
40
+ | {LazyCons.this.xs} lazylists.LazyList[? 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[box ? B]
11
+ | Found: {f, xs} LazyList[? 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[box ? B]
23
+ | Found: {f, xs} LazyList[? B]
24
24
| Required: {xs} LazyList[B]
25
25
28 | this: ({xs, f} Mapped) =>
26
26
29 | def isEmpty = false
Original file line number Diff line number Diff line change 1
1
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/try.scala:23:49 ------------------------------------------
2
2
23 | val a = handle[Exception, CanThrow[Exception]] { // error
3
3
| ^
4
- | Found: ? ({*} CT[Exception]) -> {*} CT[? >: box ? Exception <: box ? Exception]
5
- | Required: CanThrow[Exception] => box {*} CT[Exception]
4
+ | Found: ? ({*} CT[Exception]) -> {*} CT[? >: ? Exception <: ? Exception]
5
+ | Required: CanThrow[Exception] => box {*} CT[Exception]
6
6
24 | (x: CanThrow[Exception]) => x
7
7
25 | }{
8
8
|
You can’t perform that action at this time.
0 commit comments