File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 667 | def f2[T <: String] = classOf[T] // error
77 | ^
88 | T is not a class type
9- |
9+ |
1010 | where: T is a type in method f2 with bounds <: String
1111-- Error: tests/neg/classOf.scala:9:18 ---------------------------------------------------------------------------------
12129 | val y = classOf[C { type I = String }] // error
Original file line number Diff line number Diff line change 33 | ^
44 | class Fail cannot be defined due to a conflict between its parents when
55 | implementing a super-accessor for foo in trait C:
6- |
6+ |
77 | 1. One of its parent (C) contains a call super.foo in its body,
88 | and when a super-call in a trait is written without an explicit parent
99 | listed in brackets, it is implemented by a generated super-accessor in
1919 | Y (the type of foo in trait C).
2020 | Hence, the super-accessor that needs to be generated in Fail
2121 | is illegal.
22- |
22+ |
2323 | Here are two possible ways to resolve this:
24- |
24+ |
2525 | 1. Change the linearization order of Fail such that
2626 | C comes before B.
2727 | 2. Alternatively, replace super.foo in the body of trait C by a
Original file line number Diff line number Diff line change 33 | ^
44 | Cannot prove that B#X <:< A#X..
55 | I found:
6- |
6+ |
77 | <:<.refl[Nothing]
8- |
8+ |
99 | But method refl in object <:< does not match type B#X <:< A#X.
1010-- Error: tests/neg/subtyping.scala:12:27 ------------------------------------------------------------------------------
111112 | implicitly[a.T <:< a.U] // error: no implicit argument
1212 | ^
1313 | Cannot prove that a.T <:< a.U..
1414 | I found:
15- |
15+ |
1616 | <:<.refl[Nothing]
17- |
17+ |
1818 | 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