mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Testing state vars that are declared after functions that use them
This commit is contained in:
parent
4117e859eb
commit
a0b42105e4
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user