File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
compiler/src/dotty/tools/dotc/transform/patmat Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -839,12 +839,14 @@ class SpaceEngine(using Context) extends SpaceLogic {
839839 }
840840
841841 private def redundancyCheckable (sel : Tree ): Boolean =
842- // Ignore Expr for unreachability as a special case.
842+ // Ignore Expr[T] and Type[T] for unreachability as a special case.
843843 // Quote patterns produce repeated calls to the same unapply method, but with different implicit parameters.
844844 // Since we assume that repeated calls to the same unapply method overlap
845845 // and implicit parameters cannot normally differ between two patterns in one `match`,
846- // the easiest solution is just to ignore Expr.
847- ! sel.tpe.hasAnnotation(defn.UncheckedAnnot ) && ! sel.tpe.widen.isRef(defn.QuotedExprClass )
846+ // the easiest solution is just to ignore Expr[T] and Type[T].
847+ ! sel.tpe.hasAnnotation(defn.UncheckedAnnot )
848+ && ! sel.tpe.widen.isRef(defn.QuotedExprClass )
849+ && ! sel.tpe.widen.isRef(defn.QuotedTypeClass )
848850
849851 def checkRedundancy (_match : Match ): Unit = {
850852 val Match (sel, cases) = _match
You can’t perform that action at this time.
0 commit comments