Skip to content

Commit e5bcb1a

Browse files
committed
Rename allowExperimentalFeatures --> compilerSupportsExperimental
1 parent bfb61e3 commit e5bcb1a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,6 @@ object Config {
225225
* `Properties.experimental`. Can be re-assigned, e.g. to allow tests
226226
* of experimental features.
227227
*/
228-
@sharable private[dotty] var allowExperimentalFeatures =
228+
@sharable private[dotty] var compilerSupportsExperimental =
229229
Properties.experimental && !assumeNonExperimentalCompiler
230230
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ object Feature:
9797
else
9898
false
9999

100-
def allowExperimentalFeatures(using Context) =
101-
Config.allowExperimentalFeatures && !ctx.settings.YnoExperimental.value
100+
def compilerSupportsExperimental(using Context) =
101+
Config.compilerSupportsExperimental && !ctx.settings.YnoExperimental.value
102102

103103
def checkExperimentalFeature(which: String, srcPos: SrcPos = NoSourcePosition)(using Context) =
104-
if !allowExperimentalFeatures then
104+
if !compilerSupportsExperimental then
105105
report.error(i"Experimental feature$which may only be used with nightly or snapshot version of compiler", srcPos)
106106

107107
/** Check that experimental compiler options are only set for snapshot or nightly compiler versions. */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import dotty.tools.vulpix.TestConfiguration.defaultOptions
3939
trait ParallelTesting extends RunnerOrchestration { self =>
4040
import ParallelTesting._
4141

42-
Config.allowExperimentalFeatures = true
42+
Config.compilerSupportsExperimental = true
4343

4444
/** If the running environment supports an interactive terminal, each `Test`
4545
* will be run with a progress bar and real time feedback

0 commit comments

Comments
 (0)