File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ object Feature:
162162 do checkExperimentalFeature(s " feature $setting" , NoSourcePosition )
163163
164164 def isExperimentalEnabled (using Context ): Boolean =
165- (Properties .experimental && ! ctx.settings.YnoExperimental .value) || ctx.settings.experimental.value
165+ (Properties .unstableExperimentalEnabled && ! ctx.settings.YnoExperimental .value) || ctx.settings.experimental.value
166166
167167 /** Handle language import `import language.<prefix>.<imported>` if it is one
168168 * of the global imports `pureFunctions` or `captureChecking`. In this case
Original file line number Diff line number Diff line change @@ -86,11 +86,12 @@ trait PropertiesTrait {
8686
8787 /** Whether the current version of compiler is experimental
8888 *
89- * 1. Snapshot, nightly releases and non-bootstrapped compiler are experimental.
90- * 2. Features supported by experimental versions of the compiler:
91- * - research plugins
89+ * Snapshot, nightly releases and non-bootstrapped compiler are experimental.
9290 */
93- val experimental : Boolean = versionString.contains(" SNAPSHOT" ) || versionString.contains(" NIGHTLY" ) || versionString.contains(" nonbootstrapped" )
91+ val unstableExperimentalEnabled : Boolean = versionString.contains(" SNAPSHOT" ) || versionString.contains(" NIGHTLY" ) || versionString.contains(" nonbootstrapped" )
92+
93+ /** Whether the current version of compiler supports research plugins. */
94+ val researchPluginEnabled : Boolean = versionString.contains(" SNAPSHOT" ) || versionString.contains(" NIGHTLY" ) || versionString.contains(" nonbootstrapped" )
9495
9596 val copyrightString : String = scalaPropOrElse(" copyright.string" , " (c) 2002-2017 LAMP/EPFL" )
9697
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ trait Plugins {
129129 val updatedPlan = Plugins .schedule(plan, pluginPhases)
130130
131131 // add research plugins
132- if Properties .experimental && ! ctx.settings. YnoExperimental .value then
132+ if Properties .researchPluginEnabled then
133133 plugins.collect { case p : ResearchPlugin => p }.foldRight(updatedPlan) {
134134 (plug, plan) => plug.init(options(plug), plan)
135135 }
You can’t perform that action at this time.
0 commit comments