Skip to content

Commit acacffe

Browse files
committed
chore: add 3.1-migration in the compiler
1 parent 473f8ce commit acacffe

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
@@ -8,7 +8,8 @@ import Feature.isPreviewEnabled
88
import util.Property
99

1010
enum SourceVersion:
11-
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.
11+
case `3.0-migration`, `3.0`
12+
case `3.1-migration`, `3.1`
1213
case `3.2-migration`, `3.2`
1314
case `3.3-migration`, `3.3`
1415
case `3.4-migration`, `3.4`
@@ -45,10 +46,10 @@ object SourceVersion extends Property.Key[SourceVersion]:
4546
val defaultSourceVersion = `3.7`
4647

4748
/* Illegal source versions that may not appear in the settings `-source:<...>` */
48-
val illegalInSettings = List(`never`)
49+
val illegalInSettings = List(`3.1-migration`, `never`)
4950

5051
/* Illegal source versions that may not appear as an import `import scala.language.<...>` */
51-
val illegalInImports = List(`never`)
52+
val illegalInImports = List(`3.1-migration`, `never`)
5253

5354
/** language versions that may appear in a language import, are deprecated, but not removed from the standard library. */
5455
val illegalSourceVersionNames = illegalInImports.map(_.toString.toTermName)

0 commit comments

Comments
 (0)