File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
compiler/src/dotty/tools/dotc/transform/patmat Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -773,7 +773,7 @@ object SpaceEngine {
773773 }
774774
775775 private def exhaustivityCheckable (sel : Tree )(using Context ): Boolean = {
776- val seen = collection.mutable.Set .empty[Type ]
776+ val seen = collection.mutable.Set .empty[Symbol ]
777777
778778 // Possible to check everything, but be compatible with scalac by default
779779 def isCheckable (tp : Type ): Boolean =
@@ -789,7 +789,7 @@ object SpaceEngine {
789789 tpw.isRef(defn.BooleanClass ) ||
790790 classSym.isAllOf(JavaEnum ) ||
791791 classSym.is(Case ) && {
792- if seen.add(tpw ) then productSelectorTypes(tpw, sel.srcPos).exists(isCheckable(_))
792+ if seen.add(classSym ) then productSelectorTypes(tpw, sel.srcPos).exists(isCheckable(_))
793793 else true // recursive case class: return true and other members can still fail the check
794794 }
795795
Original file line number Diff line number Diff line change 1+ // minimised from github.com/Adam-Vandervorst/CZ2
2+
3+ import scala .collection .mutable
4+
5+ private trait EMImpl [V , F [_]]
6+
7+ case class EM [V2 ](apps : ExprMap [ExprMap [V2 ]]) extends EMImpl [V2 , EM ]:
8+ def collect [W ](pf : PartialFunction [V2 , W ]): Unit =
9+ val apps1 = apps.collect(_.collect(pf))
10+
11+ case class ExprMap [V ](var em : EM [V ] = null ) extends EMImpl [V , ExprMap ]:
12+ def collect [W ](pf : PartialFunction [V , W ]): ExprMap [W ] = ??? // was: StackOverflow in isCheckable
You can’t perform that action at this time.
0 commit comments