Skip to content

Commit 82fb399

Browse files
committed
Graduated warning is not triggered when migrating
1 parent df74102 commit 82fb399

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/report.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ object report:
7474

7575
def gradualErrorOrMigrationWarning(msg: Message, pos: SrcPos = NoSourcePosition, warnFrom: SourceVersion, errorFrom: SourceVersion)(using Context): Unit =
7676
if sourceVersion.isAtLeast(errorFrom) then errorOrMigrationWarning(msg, pos, errorFrom)
77-
else if sourceVersion.isAtLeast(warnFrom) then warning(msg, pos)
77+
else if sourceVersion.ordinal >= warnFrom.ordinal then warning(msg, pos)
7878

7979
def restrictionError(msg: Message, pos: SrcPos = NoSourcePosition)(using Context): Unit =
8080
error(msg.mapMsg("Implementation restriction: " + _), pos)

0 commit comments

Comments
 (0)