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:
209209 else
210210 tp.derivedAppliedType(tycon1, args1 :+ res1)
211211 else
212- tp.derivedAppliedType(tycon1, args.mapConserve(arg => box( this (arg) )))
212+ tp.derivedAppliedType(tycon1, args.mapConserve(arg => this (arg)))
213213 case tp @ RefinedType (core, rname, rinfo) if defn.isFunctionType(tp) =>
214214 val rinfo1 = apply(rinfo)
215215 if rinfo1 ne rinfo then rinfo1.toFunctionType(isJava = false , alwaysDependent = true )
Original file line number Diff line number Diff line change 373717 | def tail = xs() // error: cannot have an inferred type
3838 | ^^^^^^^^^^^^^^^
3939 | 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]
4141 | with non-empty capture set {LazyCons.this.xs}.
4242 | The type needs to be declared explicitly.
Original file line number Diff line number Diff line change 88-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/lazylists2.scala:18:4 ------------------------------------
9918 | final class Mapped extends LazyList[B]: // error
1010 | ^
11- | Found: {f, xs} LazyList[box ? B]
11+ | Found: {f, xs} LazyList[? B]
1212 | Required: {f} LazyList[B]
131319 | this: ({xs, f} Mapped) =>
141420 | def isEmpty = false
2020-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/lazylists2.scala:27:4 ------------------------------------
212127 | final class Mapped extends LazyList[B]: // error
2222 | ^
23- | Found: {f, xs} LazyList[box ? B]
23+ | Found: {f, xs} LazyList[? B]
2424 | Required: {xs} LazyList[B]
252528 | this: ({xs, f} Mapped) =>
262629 | def isEmpty = false
Original file line number Diff line number Diff line change 11-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/try.scala:23:49 ------------------------------------------
2223 | val a = handle[Exception, CanThrow[Exception]] { // error
33 | ^
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]
6624 | (x: CanThrow[Exception]) => x
7725 | }{
88 |
You can’t perform that action at this time.
0 commit comments