mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Declaring all state vars before any function is visited
This commit is contained in:
@@ -531,6 +531,17 @@ BOOST_AUTO_TEST_CASE(storage_value_vars)
|
||||
}
|
||||
)";
|
||||
CHECK_SUCCESS_NO_WARNINGS(text);
|
||||
text = R"(
|
||||
contract C
|
||||
{
|
||||
function f() public view {
|
||||
assert(c > 0);
|
||||
}
|
||||
uint c;
|
||||
}
|
||||
)";
|
||||
CHECK_WARNING(text, "Assertion violation happens here");
|
||||
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(while_loop_simple)
|
||||
|
||||
Reference in New Issue
Block a user