Add gasleft constraint and use full member access name

This commit is contained in:
Leonardo Alt
2018-10-22 18:19:11 +02:00
parent b46b827c30
commit e2cf5f6ed9
7 changed files with 45 additions and 16 deletions
@@ -0,0 +1,10 @@
pragma experimental SMTChecker;
contract C
{
function f(uint difficulty) public view {
assert(block.difficulty == difficulty);
}
}
// ----
// Warning: (91-129): Assertion violation happens here
@@ -4,7 +4,11 @@ contract C
{
function f() public view {
assert(gasleft() > 0);
uint g = gasleft();
assert(g < gasleft());
assert(g >= gasleft());
}
}
// ----
// Warning: (76-97): Assertion violation happens here
// Warning: (123-144): Assertion violation happens here