diff options
author | chriseth <chris@ethereum.org> | 2018-02-22 22:17:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-22 22:17:19 +0800 |
commit | 8fc9535d43df26001f7b34488d073c06fc4fd358 (patch) | |
tree | a25e8823ba9d06d42ba43beb856fbbe6dd42fa2c /libsolidity/analysis | |
parent | 090d7037409247bd16fc0f9ae41500fa42dde498 (diff) | |
parent | c182284d28faa45e668fe20293e9e08734187ee3 (diff) | |
download | dexon-solidity-8fc9535d43df26001f7b34488d073c06fc4fd358.tar.gz dexon-solidity-8fc9535d43df26001f7b34488d073c06fc4fd358.tar.zst dexon-solidity-8fc9535d43df26001f7b34488d073c06fc4fd358.zip |
Merge pull request #3565 from ethereum/doNotWarnAboutAnalysisOnlyExpFeatures
Do not warn about analysis-only experimental features.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/SyntaxChecker.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp index 5a3745b0..74834ba4 100644 --- a/libsolidity/analysis/SyntaxChecker.cpp +++ b/libsolidity/analysis/SyntaxChecker.cpp @@ -93,8 +93,10 @@ bool SyntaxChecker::visit(PragmaDirective const& _pragma) m_errorReporter.syntaxError(_pragma.location(), "Duplicate experimental feature name."); else { - m_sourceUnit->annotation().experimentalFeatures.insert(ExperimentalFeatureNames.at(literal)); - m_errorReporter.warning(_pragma.location(), "Experimental features are turned on. Do not use experimental features on live deployments."); + auto feature = ExperimentalFeatureNames.at(literal); + m_sourceUnit->annotation().experimentalFeatures.insert(feature); + if (!ExperimentalFeatureOnlyAnalysis.count(feature)) + m_errorReporter.warning(_pragma.location(), "Experimental features are turned on. Do not use experimental features on live deployments."); } } } |