File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -216,9 +216,15 @@ object Config {
216216 */
217217 inline val reuseSymDenotations = true
218218
219- /** Are experimental imports are allowed? By default same as
219+ /** Turn on in order to test the CI assuming we have a stable release compiler
220+ * instead of a nightly or snapshot.
221+ */
222+ private val assumeNonExperimentalCompiler = false
223+
224+ /** Are experimental features are allowed? By default same as
220225 * `Properties.experimental`. Can be re-assigned, e.g. to allow tests
221226 * of experimental features.
222227 */
223- @ sharable private [dotty] var allowExperimentalFeatures = Properties .experimental
228+ @ sharable private [dotty] var allowExperimentalFeatures =
229+ Properties .experimental && ! assumeNonExperimentalCompiler
224230}
Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ object Feature:
106106
107107 /** Check that experimental compiler options are only set for snapshot or nightly compiler versions. */
108108 def checkExperimentalSettings (using Context ): Unit =
109- ctx.settings.language.value
110- .filter(str => str .startsWith(" experimental." ) && str != " experimental.scala2macros" )
111- .foreach(str => checkExperimentalFeature(s " $str " ) )
109+ for setting <- ctx.settings.language.value
110+ if setting .startsWith(" experimental." ) && setting != " experimental.scala2macros"
111+ do checkExperimentalFeature(s " $setting " )
112112
113113end Feature
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ import config.Feature
3232import config .Feature .{sourceVersion , migrateTo3 }
3333import config .SourceVersion ._
3434import config .SourceVersion
35- import config .Properties
3635
3736object Parsers {
3837
You can’t perform that action at this time.
0 commit comments