mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
22 lines
645 B
Solidity
22 lines
645 B
Solidity
contract C {
|
|
uint x;
|
|
bool once;
|
|
constructor() payable {
|
|
x = address(this).balance;
|
|
}
|
|
function f() public payable {
|
|
require(!once);
|
|
once = true;
|
|
require(msg.value > 0);
|
|
assert(address(this).balance > x); // should hold
|
|
assert(address(this).balance > x + 10); // should fail
|
|
}
|
|
}
|
|
// ====
|
|
// SMTEngine: all
|
|
// SMTIgnoreCex: yes
|
|
// ----
|
|
// Warning 4984: (266-272): CHC: Overflow (resulting value larger than 2**256 - 1) happens here.
|
|
// Warning 6328: (235-273): CHC: Assertion violation happens here.
|
|
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
|