File tree 3 files changed +11
-6
lines changed
compiler/src/dotty/tools/dotc 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -216,9 +216,15 @@ object Config {
216
216
*/
217
217
inline val reuseSymDenotations = true
218
218
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
220
225
* `Properties.experimental`. Can be re-assigned, e.g. to allow tests
221
226
* of experimental features.
222
227
*/
223
- @ sharable private [dotty] var allowExperimentalFeatures = Properties .experimental
228
+ @ sharable private [dotty] var allowExperimentalFeatures =
229
+ Properties .experimental && ! assumeNonExperimentalCompiler
224
230
}
Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ object Feature:
106
106
107
107
/** Check that experimental compiler options are only set for snapshot or nightly compiler versions. */
108
108
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 " )
112
112
113
113
end Feature
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ import config.Feature
32
32
import config .Feature .{sourceVersion , migrateTo3 }
33
33
import config .SourceVersion ._
34
34
import config .SourceVersion
35
- import config .Properties
36
35
37
36
object Parsers {
38
37
You can’t perform that action at this time.
0 commit comments