[SMTChecker] Declaring all state vars before any function is visited

This commit is contained in:
Leonardo Alt
2018-05-15 14:28:08 +02:00
committed by chriseth
parent 2dbb35d4a8
commit 4117e859eb
4 changed files with 27 additions and 3 deletions
+11
View File
@@ -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)