File tree 3 files changed +8
-8
lines changed
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 6
6
7 | def f2[T <: String] = classOf[T] // error
7
7
| ^
8
8
| T is not a class type
9
- |
9
+ |
10
10
| where: T is a type in method f2 with bounds <: String
11
11
-- Error: tests/neg/classOf.scala:9:18 ---------------------------------------------------------------------------------
12
12
9 | val y = classOf[C { type I = String }] // error
Original file line number Diff line number Diff line change 3
3
| ^
4
4
| class Fail cannot be defined due to a conflict between its parents when
5
5
| implementing a super-accessor for foo in trait C:
6
- |
6
+ |
7
7
| 1. One of its parent (C) contains a call super.foo in its body,
8
8
| and when a super-call in a trait is written without an explicit parent
9
9
| listed in brackets, it is implemented by a generated super-accessor in
19
19
| Y (the type of foo in trait C).
20
20
| Hence, the super-accessor that needs to be generated in Fail
21
21
| is illegal.
22
- |
22
+ |
23
23
| Here are two possible ways to resolve this:
24
- |
24
+ |
25
25
| 1. Change the linearization order of Fail such that
26
26
| C comes before B.
27
27
| 2. Alternatively, replace super.foo in the body of trait C by a
Original file line number Diff line number Diff line change 3
3
| ^
4
4
| Cannot prove that B#X <:< A#X..
5
5
| I found:
6
- |
6
+ |
7
7
| <:<.refl[Nothing]
8
- |
8
+ |
9
9
| But method refl in object <:< does not match type B#X <:< A#X.
10
10
-- Error: tests/neg/subtyping.scala:12:27 ------------------------------------------------------------------------------
11
11
12 | implicitly[a.T <:< a.U] // error: no implicit argument
12
12
| ^
13
13
| Cannot prove that a.T <:< a.U..
14
14
| I found:
15
- |
15
+ |
16
16
| <:<.refl[Nothing]
17
- |
17
+ |
18
18
| But method refl in object <:< does not match type a.T <:< a.U.
You can’t perform that action at this time.
0 commit comments