Testing state vars that are declared after functions that use them

This commit is contained in:
Leonardo Alt 2018-05-02 15:52:23 +02:00 committed by chriseth
parent 4117e859eb
commit a0b42105e4

View File

@ -506,9 +506,6 @@ BOOST_AUTO_TEST_CASE(storage_value_vars)
text = R"( text = R"(
contract C contract C
{ {
address a;
bool b;
uint c;
function f(uint x) public { function f(uint x) public {
if (x == 0) if (x == 0)
{ {
@ -527,7 +524,9 @@ BOOST_AUTO_TEST_CASE(storage_value_vars)
require(a < 100); require(a < 100);
assert(c >= 0); assert(c >= 0);
} }
address a;
bool b;
uint c;
} }
)"; )";
CHECK_SUCCESS_NO_WARNINGS(text); CHECK_SUCCESS_NO_WARNINGS(text);