Skip to content

Commit

Permalink
Merge pull request #12672 from dotty-staging/experimental-stdlib
Browse files Browse the repository at this point in the history
Correctly check experimental features
  • Loading branch information
nicolasstucki authored and anatoliykmetyuk committed Jun 2, 2021
1 parent 4c389a2 commit 945ef3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/config/Properties.scala
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ trait PropertiesTrait {

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

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

Expand Down
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/typer/Inliner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ object Inliner {
if (tree.symbol == defn.CompiletimeTesting_typeChecks) return Intrinsics.typeChecks(tree)
if (tree.symbol == defn.CompiletimeTesting_typeCheckErrors) return Intrinsics.typeCheckErrors(tree)

Feature.checkExperimentalDef(tree.symbol, tree)
if tree.symbol.isExperimental then
Feature.checkExperimentalDef(tree.symbol, tree)

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

0 comments on commit 945ef3f

Please sign in to comment.