Skip to content

Commit ebf67a6

Browse files
committed
Add -source:3.9 and -source:3.9-migrations setting options
1 parent db80935 commit ebf67a6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ enum SourceVersion:
1717
case `3.6-migration`, `3.6`
1818
case `3.7-migration`, `3.7`
1919
case `3.8-migration`, `3.8`
20+
case `3.9-migration`, `3.9`
2021
// Add 3.x-migration and 3.x here
2122
// !!! Keep in sync with scala.runtime.stdlibPatches.language !!!
2223
case `2.13`

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,19 @@ object language:
364364
@compileTimeOnly("`3.8` can only be used at compile time in import statements")
365365
object `3.8`
366366

367+
/** Set source version to 3.9-migration.
368+
*
369+
* @see [[https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html]]
370+
*/
371+
@compileTimeOnly("`3.9-migration` can only be used at compile time in import statements")
372+
object `3.9-migration`
373+
374+
/** Set source version to 3.9
375+
*
376+
* @see [[https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html]]
377+
*/
378+
@compileTimeOnly("`3.9` can only be used at compile time in import statements")
379+
object `3.9`
367380

368381
// !!! Keep in sync with dotty.tools.dotc.config.SourceVersion !!!
369382
// Also add tests in `tests/pos/source-import-3-x.scala` and `tests/pos/source-import-3-x-migration.scala`

0 commit comments

Comments
 (0)