Skip to content

Commit 68256f6

Browse files
committed
Assert that Match are not created without any CaseDef
1 parent ec19d75 commit 68256f6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/src/dotty/tools/dotc/ast/Trees.scala

+1
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ object Trees {
520520
/** selector match { cases } */
521521
case class Match[-T >: Untyped] private[ast] (selector: Tree[T], cases: List[CaseDef[T]])
522522
extends TermTree[T] {
523+
assert(cases.nonEmpty)
523524
type ThisTree[-T >: Untyped] = Match[T]
524525
def isInline = false
525526
}

0 commit comments

Comments
 (0)