File tree 2 files changed +1
-5
lines changed
compiler/src/dotty/tools/dotc
2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,6 @@ enum SourceVersion:
17
17
18
18
def isAtLeast (v : SourceVersion ) = stable.ordinal >= v.ordinal
19
19
20
- def isBetween (low : SourceVersion , high : SourceVersion ): Boolean =
21
- require(low.ordinal < high.ordinal)
22
- isAtLeast(low) && stable.ordinal <= high.ordinal
23
-
24
20
object SourceVersion extends Property .Key [SourceVersion ]:
25
21
def defaultSourceVersion = `3.2`
26
22
Original file line number Diff line number Diff line change @@ -1620,8 +1620,8 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
1620
1620
case Some (checkMode) if ! sel.tpe.hasAnnotation(defn.UncheckedAnnot ) =>
1621
1621
val isPatDef = checkMode == desugar.MatchCheck .IrrefutablePatDef
1622
1622
if ! checkIrrefutable(sel, pat, isPatDef)
1623
+ && sourceVersion.isAtLeast(`3.2`)
1623
1624
&& sourceVersion.isMigrating
1624
- && sourceVersion.isBetween(`3.2`, `future`)
1625
1625
then
1626
1626
if isPatDef then uncheckedBrackets(tree.selector) match
1627
1627
case None =>
You can’t perform that action at this time.
0 commit comments