We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 798f3bf commit 3c1e15eCopy full SHA for 3c1e15e
compiler/src/dotty/tools/dotc/typer/Checking.scala
@@ -814,10 +814,11 @@ trait Checking {
814
def check(pat: Tree, pt: Type): Boolean = (pt <:< pat.tpe) || fail(pat, pt)
815
816
def recur(pat: Tree, pt: Type): Boolean =
817
- !(sourceVersion.isAtLeast(`3.2`) && !sourceVersion.isMigrating) ||
818
- pt.hasAnnotation(defn.UncheckedAnnot) || {
+ sourceVersion.ordinal < `3.2`.ordinal
+ || pt.hasAnnotation(defn.UncheckedAnnot)
819
+ || {
820
patmatch.println(i"check irrefutable $pat: ${pat.tpe} against $pt")
- pat match {
821
+ pat match
822
case Bind(_, pat1) =>
823
recur(pat1, pt)
824
case UnApply(fn, _, pats) =>
@@ -835,7 +836,6 @@ trait Checking {
835
836
case _ =>
837
check(pat, pt)
838
}
- }
839
840
recur(pat, pt)
841
0 commit comments