mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
21 lines
435 B
Solidity
21 lines
435 B
Solidity
pragma experimental SMTChecker;
|
|
|
|
contract C {
|
|
function c() public pure returns (uint) { return 42; }
|
|
}
|
|
|
|
contract B is C {
|
|
function b() public pure returns (uint) { return c(); }
|
|
}
|
|
|
|
contract A is B {
|
|
uint public x;
|
|
|
|
function a() public {
|
|
x = b();
|
|
assert(x < 40);
|
|
}
|
|
}
|
|
// ----
|
|
// Warning 6328: (254-268): CHC: Assertion violation happens here.\nCounterexample:\nx = 42\n\n\n\nTransaction trace:\nconstructor()\nState: x = 0\na()
|