Skip to content

Commit 2b859ac

Browse files
hamzaremmaltgodzik
authored andcommitted
chore: add 3.1-migration in the compiler
[Cherry-picked acacffe]
1 parent 0ea554b commit 2b859ac

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/src/dotty/tools/dotc/config/SourceVersion.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import core.Decorators.*
66
import util.Property
77

88
enum SourceVersion:
9-
case `3.0-migration`, `3.0`, `3.1` // Note: do not add `3.1-migration` here, 3.1 is the same language as 3.0.
9+
case `3.0-migration`, `3.0`
10+
case `3.1-migration`, `3.1`
1011
case `3.2-migration`, `3.2`
1112
case `3.3-migration`, `3.3`
1213
case `future-migration`, `future`
@@ -25,10 +26,10 @@ object SourceVersion extends Property.Key[SourceVersion]:
2526
def defaultSourceVersion = `3.3`
2627

2728
/* Illegal source versions that may not appear in the settings `-source:<...>` */
28-
val illegalInSettings = List(`never`)
29+
val illegalInSettings = List(`3.1-migration`, `never`)
2930

3031
/* Illegal source versions that may not appear as an import `import scala.language.<...>` */
31-
val illegalInImports = List(`never`)
32+
val illegalInImports = List(`3.1-migration`, `never`)
3233

3334
/** language versions that may appear in a language import, are deprecated, but not removed from the standard library. */
3435
val illegalSourceVersionNames = "3.1-migration" :: illegalInImports.map(_.toString.toTermName)

0 commit comments

Comments
 (0)