File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
compiler/src/dotty/tools/dotc/transform/patmat Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -718,6 +718,11 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
718
718
}
719
719
720
720
private def redundancyCheckable (sel : Tree ): Boolean =
721
+ // Ignore Expr for unreachability as a special case.
722
+ // Quote patterns produce repeated calls to the same unapply method, but with different implicit parameters.
723
+ // Since we assume that repeated calls to the same unapply method overlap
724
+ // and implicit parameters cannot normally differ between two patterns in one `match`,
725
+ // the easiest solution is just to ignore Expr.
721
726
! sel.tpe.hasAnnotation(defn.UncheckedAnnot ) && ! sel.tpe.widen.isRef(defn.QuotedExprClass )
722
727
723
728
def checkRedundancy (_match : Match ): Unit = {
You can’t perform that action at this time.
0 commit comments