File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -917,10 +917,8 @@ object TypeOps:
917917 }
918918
919919 def instantiate (): Type = {
920- var failedMixin = false
921920 for tp <- mixins.reverseIterator do
922- failedMixin ||= ! (protoTp1 <:< tp)
923- if failedMixin then return NoType
921+ protoTp1 <:< tp
924922 maximizeType(protoTp1, NoSpan )
925923 wildApprox(protoTp1)
926924 }
Original file line number Diff line number Diff line change @@ -10,3 +10,7 @@ class Test:
1010 def t1 (foo : Foo [Int ]): Unit = foo match
1111 case _ : Mark [t] =>
1212 case _ =>
13+
14+ def t2 [F <: Foo [Int ]](foo : F ): Unit = foo match
15+ case _ : Mark [t] =>
16+ case _ =>
Original file line number Diff line number Diff line change 1+ //> using options -Werror
2+
13trait Outer :
24 sealed trait Foo
35 case class Bar1 () extends Foo
You can’t perform that action at this time.
0 commit comments