File tree 3 files changed +7
-6
lines changed
compiler/src/dotty/tools/dotc
3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ object Feature:
162
162
do checkExperimentalFeature(s " feature $setting" , NoSourcePosition )
163
163
164
164
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
166
166
167
167
/** Handle language import `import language.<prefix>.<imported>` if it is one
168
168
* 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 {
86
86
87
87
/** Whether the current version of compiler is experimental
88
88
*
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.
92
90
*/
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" )
94
95
95
96
val copyrightString : String = scalaPropOrElse(" copyright.string" , " (c) 2002-2017 LAMP/EPFL" )
96
97
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ trait Plugins {
129
129
val updatedPlan = Plugins .schedule(plan, pluginPhases)
130
130
131
131
// add research plugins
132
- if Properties .experimental && ! ctx.settings. YnoExperimental .value then
132
+ if Properties .researchPluginEnabled then
133
133
plugins.collect { case p : ResearchPlugin => p }.foldRight(updatedPlan) {
134
134
(plug, plan) => plug.init(options(plug), plan)
135
135
}
You can’t perform that action at this time.
0 commit comments