mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #3600 from ethereum/version050IsAnalysisOnly
Do not warn about 0.5.0 experimental pragma.
This commit is contained in:
commit
f190b27431
@ -8,6 +8,7 @@ Features:
|
|||||||
* Type Checker: Disallow uninitialized storage pointers as experimental 0.5.0 feature.
|
* Type Checker: Disallow uninitialized storage pointers as experimental 0.5.0 feature.
|
||||||
* Support and recommend using ``emit EventName();`` to call events explicitly.
|
* Support and recommend using ``emit EventName();`` to call events explicitly.
|
||||||
* Syntax Analyser: Do not warn about experimental features if they do not concern code generation.
|
* Syntax Analyser: Do not warn about experimental features if they do not concern code generation.
|
||||||
|
* Syntax Analyser: Do not warn about ``pragma experimental "v0.5.0"`` since it does not affect code generation.
|
||||||
* Syntax Checker: Mark ``throw`` as an error as experimental 0.5.0 feature.
|
* Syntax Checker: Mark ``throw`` as an error as experimental 0.5.0 feature.
|
||||||
* Syntax Checker: Issue error if no visibility is specified on contract functions as experimental 0.5.0 feature.
|
* Syntax Checker: Issue error if no visibility is specified on contract functions as experimental 0.5.0 feature.
|
||||||
* Type Checker: disallow combining hex numbers and unit denominations as experimental 0.5.0 feature.
|
* Type Checker: disallow combining hex numbers and unit denominations as experimental 0.5.0 feature.
|
||||||
|
@ -40,6 +40,7 @@ static const std::map<ExperimentalFeature, bool> ExperimentalFeatureOnlyAnalysis
|
|||||||
{
|
{
|
||||||
{ ExperimentalFeature::SMTChecker, true },
|
{ ExperimentalFeature::SMTChecker, true },
|
||||||
{ ExperimentalFeature::TestOnlyAnalysis, true },
|
{ ExperimentalFeature::TestOnlyAnalysis, true },
|
||||||
|
{ ExperimentalFeature::V050, true }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const std::map<std::string, ExperimentalFeature> ExperimentalFeatureNames =
|
static const std::map<std::string, ExperimentalFeature> ExperimentalFeatureNames =
|
||||||
|
@ -102,7 +102,6 @@ BOOST_AUTO_TEST_CASE(double_variable_declaration_050)
|
|||||||
)";
|
)";
|
||||||
CHECK_WARNING_ALLOW_MULTI(text, (vector<string>{
|
CHECK_WARNING_ALLOW_MULTI(text, (vector<string>{
|
||||||
"This declaration shadows an existing declaration.",
|
"This declaration shadows an existing declaration.",
|
||||||
"Experimental features",
|
|
||||||
"Unused local variable",
|
"Unused local variable",
|
||||||
"Unused local variable"
|
"Unused local variable"
|
||||||
}));
|
}));
|
||||||
@ -133,7 +132,6 @@ BOOST_AUTO_TEST_CASE(double_variable_declaration_disjoint_scope_050)
|
|||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
CHECK_WARNING_ALLOW_MULTI(text, (vector<string>{
|
CHECK_WARNING_ALLOW_MULTI(text, (vector<string>{
|
||||||
"Experimental features",
|
|
||||||
"Unused local variable",
|
"Unused local variable",
|
||||||
"Unused local variable"
|
"Unused local variable"
|
||||||
}));
|
}));
|
||||||
@ -164,7 +162,6 @@ BOOST_AUTO_TEST_CASE(double_variable_declaration_disjoint_scope_activation_050)
|
|||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
CHECK_WARNING_ALLOW_MULTI(text, (vector<string>{
|
CHECK_WARNING_ALLOW_MULTI(text, (vector<string>{
|
||||||
"Experimental features",
|
|
||||||
"Unused local variable",
|
"Unused local variable",
|
||||||
"Unused local variable"
|
"Unused local variable"
|
||||||
}));
|
}));
|
||||||
@ -262,7 +259,7 @@ BOOST_AUTO_TEST_CASE(scoping_for)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
CHECK_WARNING(text, "Experimental features");
|
CHECK_SUCCESS_NO_WARNINGS(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(scoping_for2)
|
BOOST_AUTO_TEST_CASE(scoping_for2)
|
||||||
@ -276,7 +273,7 @@ BOOST_AUTO_TEST_CASE(scoping_for2)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
CHECK_WARNING(text, "Experimental features");
|
CHECK_SUCCESS_NO_WARNINGS(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(scoping_for3)
|
BOOST_AUTO_TEST_CASE(scoping_for3)
|
||||||
@ -7674,7 +7671,7 @@ BOOST_AUTO_TEST_CASE(non_external_fallback)
|
|||||||
function () external { }
|
function () external { }
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
CHECK_WARNING(text, "Experimental features are turned on.");
|
CHECK_SUCCESS_NO_WARNINGS(text);
|
||||||
text = R"(
|
text = R"(
|
||||||
pragma experimental "v0.5.0";
|
pragma experimental "v0.5.0";
|
||||||
contract C {
|
contract C {
|
||||||
|
Loading…
Reference in New Issue
Block a user