File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
compiler/src/dotty/tools/dotc/transform/patmat Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -680,6 +680,7 @@ object SpaceEngine {
680680 case OrType (tp1, tp2) => inhabited(tp1) || inhabited(tp2)
681681 case tp : RefinedType => inhabited(tp.parent)
682682 case tp : TypeRef => ! containsUninhabitedField(tp) && inhabited(tp.prefix)
683+ case tp : AppliedType => ! containsUninhabitedField(tp) && inhabited(tp.tycon)
683684 case _ => ! containsUninhabitedField(tp)
684685
685686 if inhabited(refined) then refined
Original file line number Diff line number Diff line change 1+ trait Nodes1 {
2+ sealed trait B
3+ final case class R1 () extends B
4+ }
5+
6+ trait Nodes2 extends Nodes1 {
7+ final case class R2 [T ]() extends B
8+ }
9+
10+
11+ object Impl1 extends Nodes1
12+
13+ object test2 {
14+ val a : Impl1 .B = ???
15+ a match {
16+ case Impl1 .R1 () => ???
17+ }
18+ }
You can’t perform that action at this time.
0 commit comments