Skip to content

Commit bedb0f8

Browse files
committed
Add 3.7 and 3.7-migration
1 parent aad6f7d commit bedb0f8

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

Diff for: compiler/src/dotty/tools/dotc/config/SourceVersion.scala

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ enum SourceVersion:
1212
case `3.4-migration`, `3.4`
1313
case `3.5-migration`, `3.5`
1414
case `3.6-migration`, `3.6`
15+
case `3.7-migration`, `3.7`
1516
// !!! Keep in sync with scala.runtime.stdlibPatches.language !!!
1617
case `future-migration`, `future`
1718

Diff for: library/src/scala/runtime/stdLibPatches/language.scala

+15
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,21 @@ object language:
300300
@compileTimeOnly("`3.6` can only be used at compile time in import statements")
301301
object `3.6`
302302

303+
/** Set source version to 3.7-migration.
304+
*
305+
* @see [[https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html]]
306+
*/
307+
@compileTimeOnly("`3.7-migration` can only be used at compile time in import statements")
308+
object `3.7-migration`
309+
310+
/** Set source version to 3.7
311+
*
312+
* @see [[https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html]]
313+
*/
314+
@compileTimeOnly("`3.7` can only be used at compile time in import statements")
315+
object `3.7`
316+
317+
303318
// !!! Keep in sync with dotty.tools.dotc.config.SourceVersion !!!
304319
// Also add tests in `tests/pos/source-import-3-x.scala` and `tests/pos/source-import-3-x-migration.scala`
305320

Diff for: tests/pos/source-import-3-7-migration.scala

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import language.`3.7-migration`

Diff for: tests/pos/source-import-3-7.scala

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import language.`3.7`

0 commit comments

Comments
 (0)