solidity/test/libsolidity/smtCheckerTests/external_calls/call_with_value_1.sol

17 lines
564 B
Solidity
Raw Normal View History

2021-08-30 16:21:22 +00:00
contract C {
function g(address payable i) public {
require(address(this).balance == 100);
i.call{value: 10}("");
2021-09-27 15:45:34 +00:00
assert(address(this).balance == 90); // should hold
assert(address(this).balance == 100); // should fail
2021-08-30 16:21:22 +00:00
}
}
// ====
// SMTEngine: all
2021-09-27 15:45:34 +00:00
// SMTIgnoreOS: macos
2021-08-30 16:21:22 +00:00
// ----
// Warning 9302: (96-117): Return value of low-level calls not used.
2021-09-27 15:45:34 +00:00
// Warning 6328: (121-156): CHC: Assertion violation might happen here.
2022-01-12 13:46:30 +00:00
// Warning 6328: (175-211): CHC: Assertion violation happens here.
2021-09-27 15:45:34 +00:00
// Warning 4661: (121-156): BMC: Assertion violation happens here.