mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
14 lines
390 B
Solidity
14 lines
390 B
Solidity
contract C {
|
|
constructor() payable {
|
|
require(msg.value > 100);
|
|
}
|
|
function f() public view {
|
|
assert(address(this).balance > 100); // should hold
|
|
assert(address(this).balance > 200); // should fail
|
|
}
|
|
}
|
|
// ====
|
|
// SMTEngine: all
|
|
// ----
|
|
// Warning 6328: (153-188): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor(){ value: 101 }\nC.f()
|