mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
17 lines
413 B
Solidity
17 lines
413 B
Solidity
|
pragma experimental SMTChecker;
|
||
|
|
||
|
interface D { function e() external; }
|
||
|
|
||
|
contract C {
|
||
|
bool locked = true;
|
||
|
|
||
|
function call(address target) public {
|
||
|
assert(locked);
|
||
|
locked = false;
|
||
|
D(target).e();
|
||
|
locked = true;
|
||
|
}
|
||
|
}
|
||
|
// ----
|
||
|
// Warning 6328: (150-164): CHC: Assertion violation happens here.\nCounterexample:\nlocked = false\ntarget = 0\n\n\nTransaction trace:\nconstructor()\nState: locked = true\ncall(0)
|