mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add gasleft constraint and use full member access name
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user