mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Do not warn about enabled ABIEncoderV2 anymore.
This commit is contained in:
@@ -106,7 +106,7 @@ bool SyntaxChecker::visit(PragmaDirective const& _pragma)
|
||||
{
|
||||
auto feature = ExperimentalFeatureNames.at(literal);
|
||||
m_sourceUnit->annotation().experimentalFeatures.insert(feature);
|
||||
if (!ExperimentalFeatureOnlyAnalysis.count(feature))
|
||||
if (!ExperimentalFeatureWithoutWarning.count(feature))
|
||||
m_errorReporter.warning(_pragma.location(), "Experimental features are turned on. Do not use experimental features on live deployments.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
namespace dev
|
||||
{
|
||||
@@ -35,10 +36,11 @@ enum class ExperimentalFeature
|
||||
TestOnlyAnalysis
|
||||
};
|
||||
|
||||
static std::map<ExperimentalFeature, bool> const ExperimentalFeatureOnlyAnalysis =
|
||||
static std::set<ExperimentalFeature> const ExperimentalFeatureWithoutWarning =
|
||||
{
|
||||
{ ExperimentalFeature::SMTChecker, true },
|
||||
{ ExperimentalFeature::TestOnlyAnalysis, true },
|
||||
ExperimentalFeature::ABIEncoderV2,
|
||||
ExperimentalFeature::SMTChecker,
|
||||
ExperimentalFeature::TestOnlyAnalysis,
|
||||
};
|
||||
|
||||
static std::map<std::string, ExperimentalFeature> const ExperimentalFeatureNames =
|
||||
|
||||
@@ -982,7 +982,7 @@ namespace
|
||||
bool onlySafeExperimentalFeaturesActivated(set<ExperimentalFeature> const& features)
|
||||
{
|
||||
for (auto const feature: features)
|
||||
if (!ExperimentalFeatureOnlyAnalysis.count(feature))
|
||||
if (!ExperimentalFeatureWithoutWarning.count(feature))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user