File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ -- [E057] Type Mismatch Error: tests/neg/6697.scala:6:35 ---------------------------------------------------------------
2+ 6 | type Copy[O <: Off] = Of[Sup[O], Sub[O]] // error
3+ | ^
4+ | Type argument Test.Sub[O] does not conform to upper bound Test.Sup[O]
5+ |
6+ | Note: a match type could not be fully reduced:
7+ |
8+ | trying to reduce Test.Sub[O]
9+ | failed since selector O
10+ | matches none of the cases
11+ |
12+ | case Test.Of[sup, sub] => sub
13+
14+ longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ object Test {
33 case class Of [sup, sub <: sup]() extends Off
44 type Sup [O <: Off ] = O match { case Of [sup, sub] => sup }
55 type Sub [O <: Off ] = O match { case Of [sup, sub] => sub }
6- type Copy [O <: Off ] = Of [Sup [O ], Sub [O ]]
6+ type Copy [O <: Off ] = Of [Sup [O ], Sub [O ]] // error
77}
You can’t perform that action at this time.
0 commit comments