2019-05-02 16:28:27 +00:00
|
|
|
pragma experimental SMTChecker;
|
|
|
|
|
|
|
|
contract C
|
|
|
|
{
|
|
|
|
uint public x;
|
|
|
|
C c;
|
|
|
|
function f(C _c) public {
|
|
|
|
c = _c;
|
|
|
|
}
|
|
|
|
function g() public {
|
|
|
|
C this = c;
|
|
|
|
x = 0;
|
|
|
|
this.h();
|
|
|
|
// State knowledge is erased.
|
|
|
|
// Function call is not inlined.
|
|
|
|
assert(x == 0);
|
|
|
|
}
|
|
|
|
function h() public {
|
|
|
|
x = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2020-06-19 00:26:46 +00:00
|
|
|
// Warning 2319: (160-166): This declaration shadows a builtin symbol.
|
2020-12-02 17:40:48 +00:00
|
|
|
// Warning 6328: (268-282): CHC: Assertion violation happens here.\nCounterexample:\nx = 2, c = 0\n\n\n\nTransaction trace:\nconstructor()\nState: x = 0, c = 0\ng()
|