Skip to content

Commit d565dd5

Browse files
committed
Add -Yno-experimental to the library
1 parent a71d26b commit d565dd5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

library/src-non-bootstrapped/scala/annotation/internal/experimentalTest.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ package internal
88
* It may accidentally be visible while compiling the non-bootstrapped library.
99
*/
1010
@experimental def testExperimental = 4
11+
12+
// def test = testExperimental // This should fail if un-commented

project/Build.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,10 @@ object Build {
17401740
val base =
17411741
project.withCommonSettings.
17421742
settings(
1743-
libraryDependencies += "org.scala-lang" % "scala-library" % stdlibVersion
1743+
libraryDependencies += "org.scala-lang" % "scala-library" % stdlibVersion,
1744+
// Make sure we do not refer to experimental features outside an experimental scope.
1745+
// In other words, disable NIGHTLY/SNAPSHOT experimental scope.
1746+
scalacOptions += "-Yno-experimental",
17441747
).
17451748
settings(dottyLibrarySettings)
17461749
if (mode == Bootstrapped) {

0 commit comments

Comments
 (0)