Skip to content

Commit 945ef3f

Browse files
nicolasstuckianatoliykmetyuk
authored andcommitted
Merge pull request #12672 from dotty-staging/experimental-stdlib
Correctly check experimental features
1 parent 4c389a2 commit 945ef3f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ trait PropertiesTrait {
8484

8585
/** Whether the current version of compiler is experimental
8686
*
87-
* 1. Snapshot and nightly releases are experimental.
87+
* 1. Snapshot, nightly releases and non-bootstrapped compiler are experimental.
8888
* 2. Features supported by experimental versions of the compiler:
8989
* - research plugins
9090
*/
91-
val experimental: Boolean = versionString.contains("SNAPSHOT") || versionString.contains("NIGHTLY")
91+
val experimental: Boolean = versionString.contains("SNAPSHOT") || versionString.contains("NIGHTLY") || versionString.contains("nonbootstrapped")
9292

9393
val copyrightString: String = scalaPropOrElse("copyright.string", "(c) 2002-2017 LAMP/EPFL")
9494

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ object Inliner {
9494
if (tree.symbol == defn.CompiletimeTesting_typeChecks) return Intrinsics.typeChecks(tree)
9595
if (tree.symbol == defn.CompiletimeTesting_typeCheckErrors) return Intrinsics.typeCheckErrors(tree)
9696

97-
Feature.checkExperimentalDef(tree.symbol, tree)
97+
if tree.symbol.isExperimental then
98+
Feature.checkExperimentalDef(tree.symbol, tree)
9899

99100
/** Set the position of all trees logically contained in the expansion of
100101
* inlined call `call` to the position of `call`. This transform is necessary

0 commit comments

Comments
 (0)