File tree Expand file tree Collapse file tree 4 files changed +6
-7
lines changed
compiler/src/dotty/tools/dotc/cc
tests/neg-custom-args/captures Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -294,8 +294,7 @@ object CaptureSet:
294
294
}
295
295
296
296
def solve (variance : Int )(using Context ): Unit =
297
- if variance > 0 then isSolved = true
298
- else if variance < 0 then
297
+ if variance < 0 then
299
298
val approx = upperApprox
300
299
if approx.isConst then
301
300
elems = approx.elems
Original file line number Diff line number Diff line change 1
1
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/boxmap.scala:14:2 ----------------------------------------
2
2
14 | () => b[Box[B]]((x: A) => box(f(x))) // error
3
3
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4
- | Found: {f} () => Box[B]
4
+ | Found: {f} () => ? 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 1
1
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/capt1.scala:3:2 ------------------------------------------
2
2
3 | () => if x == null then y else y // error
3
3
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4
- | Found: {x} () => C
4
+ | Found: {x} () => ? C
5
5
| Required: () => C
6
6
7
7
longer explanation available when compiling with `-explain`
8
8
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/capt1.scala:6:2 ------------------------------------------
9
9
6 | () => if x == null then y else y // error
10
10
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11
- | Found: {x} () => C
11
+ | Found: {x} () => ? C
12
12
| Required: Matchable
13
13
14
14
longer explanation available when compiling with `-explain`
@@ -40,7 +40,7 @@ longer explanation available when compiling with `-explain`
40
40
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/capt1.scala:31:24 ----------------------------------------
41
41
31 | val z2 = h[() => Cap](() => x)(() => C()) // error
42
42
| ^^^^^^^
43
- | Found: {x} () => Cap
43
+ | Found: {x} () => ? Cap
44
44
| Required: () => Cap
45
45
46
46
longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change 1
1
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/try.scala:28:43 ------------------------------------------
2
2
28 | val b = handle[Exception, () => Nothing] { // error
3
3
| ^
4
- | Found: ? (x: CanThrow[Exception]) => {x} () => Nothing
4
+ | Found: ? (x: CanThrow[Exception]) => {x} () => ? Nothing
5
5
| Required: CanThrow[Exception] => () => Nothing
6
6
29 | (x: CanThrow[Exception]) => () => raise(new Exception)(using x)
7
7
30 | } {
You can’t perform that action at this time.
0 commit comments