Skip to content

Commit bd5a808

Browse files
committed
add source versions 3.2 and 3.2-migration
1 parent 69e3543 commit bd5a808

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ object Feature:
9191
def warnOnMigration(msg: Message, pos: SrcPos,
9292
version: SourceVersion = defaultSourceVersion)(using Context): Boolean =
9393
if sourceVersion.isMigrating && sourceVersion.stable == version
94-
|| (version == `3.0` || version == `3.1`) && migrateTo3
94+
|| (version == `3.0` || version == `3.1` || version == `3.2`) && migrateTo3
9595
then
9696
report.migrationWarning(msg, pos)
9797
true

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ trait AllScalaSettings extends CommonScalaSettings, PluginSettings, VerboseSetti
4949
/* Path related settings */
5050
val semanticdbTarget: Setting[String] = PathSetting("-semanticdb-target", "Specify an alternative output directory for SemanticDB files.", "")
5151

52-
val source: Setting[String] = ChoiceSetting("-source", "source version", "source version", List("3.0", "3.1", "future", "3.0-migration", "future-migration"), "3.0", aliases = List("--source"))
52+
val source: Setting[String] = ChoiceSetting("-source", "source version", "source version", List("3.0", "3.1", "3.2", "future", "3.0-migration", "3.1-migration", "3.2-migration", "future-migration"), "3.0", aliases = List("--source"))
5353
val uniqid: Setting[Boolean] = BooleanSetting("-uniqid", "Uniquely tag all identifiers in debugging output.", aliases = List("--unique-id"))
5454
val rewrite: Setting[Option[Rewrites]] = OptionSetting[Rewrites]("-rewrite", "When used in conjunction with a `...-migration` source version, rewrites sources to migrate to new version.", aliases = List("--rewrite"))
5555
val fromTasty: Setting[Boolean] = BooleanSetting("-from-tasty", "Compile classes from tasty files. The arguments are .tasty or .jar files.", aliases = List("--from-tasty"))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import core.Decorators.*
66
import util.Property
77

88
enum SourceVersion:
9-
case `3.0-migration`, `3.0`, `3.1`, `future-migration`, `future`
9+
case `3.0-migration`, `3.0`, `3.1-migration`, `3.1`, `3.2-migration`, `3.2`, `future-migration`, `future`
1010

1111
val isMigrating: Boolean = toString.endsWith("-migration")
1212

library/src/scala/runtime/stdLibPatches/language.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ object language:
162162
@compileTimeOnly("`3.1` can only be used at compile time in import statements")
163163
object `3.1`
164164

165-
/* This can be added when we go to 3.2
166165
/** Set source version to 3.2-migration.
167166
*
168167
* @see [[https://scalacenter.github.io/scala-3-migration-guide/docs/scala-3-migration-mode]]
@@ -176,5 +175,4 @@ object language:
176175
*/
177176
@compileTimeOnly("`3.2` can only be used at compile time in import statements")
178177
object `3.2`
179-
*/
180178
end language

0 commit comments

Comments
 (0)