Skip to content

Commit

Permalink
Add `scala.language.{3.1, 3.1-migration}`
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Oct 26, 2021
1 parent 968dd1b commit 7ee6cf1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
18 changes: 17 additions & 1 deletion library/src/scala/runtime/stdLibPatches/language.scala
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,33 @@ object language:
@compileTimeOnly("`3.0` can only be used at compile time in import statements")
object `3.0`

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

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

/* This can be added when we go to 3.2
/** Set source version to 3.2-migration.
*
* @see [[https://scalacenter.github.io/scala-3-migration-guide/docs/scala-3-migration-mode]]
*/
@compileTimeOnly("`3.2-migration` can only be used at compile time in import statements")
object `3.2-migration`
/** Set source version to 3.2
*
* @see [[https://scalacenter.github.io/scala-3-migration-guide/docs/scala-3-migration-mode]]
*/
@compileTimeOnly("`3.2` can only be used at compile time in import statements")
object `3.2`
*/
end language
1 change: 1 addition & 0 deletions tests/pos/source-import-3-0-migration.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import language.`3.0-migration`
1 change: 1 addition & 0 deletions tests/pos/source-import-3-0.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import language.`3.0`
1 change: 1 addition & 0 deletions tests/pos/source-import-3-1-migration.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import language.`3.1-migration`
1 change: 1 addition & 0 deletions tests/pos/source-import-3-1.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import language.`3.1`

0 comments on commit 7ee6cf1

Please sign in to comment.