Skip to content

Commit

Permalink
Add 3.8-migration and 3.8 to stdlib patches and Source version lists
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechMazur committed Jan 15, 2025
1 parent 03d21f1 commit ec059e5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/config/SourceVersion.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ enum SourceVersion:
case `3.5-migration`, `3.5`
case `3.6-migration`, `3.6`
case `3.7-migration`, `3.7`
case `3.8-migration`, `3.8`
// !!! Keep in sync with scala.runtime.stdlibPatches.language !!!
case `future-migration`, `future`

Expand Down
14 changes: 14 additions & 0 deletions library/src/scala/runtime/stdLibPatches/language.scala
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,20 @@ object language:
@compileTimeOnly("`3.7` can only be used at compile time in import statements")
object `3.7`

/** Set source version to 3.8-migration.
*
* @see [[https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html]]
*/
@compileTimeOnly("`3.8-migration` can only be used at compile time in import statements")
object `3.8-migration`

/** Set source version to 3.8
*
* @see [[https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html]]
*/
@compileTimeOnly("`3.8` can only be used at compile time in import statements")
object `3.8`


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

0 comments on commit ec059e5

Please sign in to comment.