Skip to content

Commit 32c88bc

Browse files
committed
Allow experimental features in Tests
... but not in TastyBootstrap tests
1 parent a0e47f7 commit 32c88bc

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package dotty.tools.dotc.config
2+
import annotation.internal.sharable
23

34
object Config {
45

@@ -219,5 +220,5 @@ object Config {
219220
* `Properties.experimental`. Can be re-assigned, e.g. to allow tests
220221
* of experimental features.
221222
*/
222-
private[dotty] var allowExperimentalFeatures = Properties.experimental
223+
@sharable private[dotty] var allowExperimentalFeatures = Properties.experimental
223224
}

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class CompilationTests {
240240
Properties.compilerInterface, Properties.scalaLibrary, Properties.scalaAsm,
241241
Properties.dottyInterfaces, Properties.jlineTerminal, Properties.jlineReader,
242242
).mkString(File.pathSeparator),
243-
Array("-Ycheck-reentrant", "-language:postfixOps", "-Xsemanticdb")
243+
Array("-Ycheck-reentrant", "-language:postfixOps", "-Xsemanticdb", "-Yno-experimental")
244244
)
245245

246246
val libraryDirs = List(Paths.get("library/src"), Paths.get("library/src-bootstrapped"))

compiler/test/dotty/tools/vulpix/ParallelTesting.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import dotc.report
2525
import dotc.interfaces.Diagnostic.ERROR
2626
import dotc.reporting.{Reporter, TestReporter}
2727
import dotc.reporting.Diagnostic
28+
import dotc.config.Config
2829
import dotc.util.DiffUtil
2930
import io.AbstractFile
3031
import dotty.tools.vulpix.TestConfiguration.defaultOptions
@@ -36,9 +37,10 @@ import dotty.tools.vulpix.TestConfiguration.defaultOptions
3637
* test suite itself runs with a high level of concurrency.
3738
*/
3839
trait ParallelTesting extends RunnerOrchestration { self =>
39-
4040
import ParallelTesting._
4141

42+
Config.allowExperimentalFeatures = true
43+
4244
/** If the running environment supports an interactive terminal, each `Test`
4345
* will be run with a progress bar and real time feedback
4446
*/

0 commit comments

Comments
 (0)