2020-11-26 16:14:58 +00:00
|
|
|
contract C {
|
|
|
|
function () external returns (uint) public g;
|
|
|
|
|
|
|
|
function f() public {
|
|
|
|
g = this.X;
|
|
|
|
function () external returns (uint) e = this.g();
|
|
|
|
assert(e() == g()); // should hold, but fails because of the lack of support for tracking function pointers
|
|
|
|
assert(e() == 1); // should fail
|
|
|
|
}
|
|
|
|
|
|
|
|
function X() public pure returns (uint) {
|
|
|
|
return 42;
|
|
|
|
}
|
|
|
|
}
|
2021-03-31 15:11:54 +00:00
|
|
|
// ====
|
|
|
|
// SMTEngine: all
|
2020-11-26 16:14:58 +00:00
|
|
|
// ----
|
2021-08-11 16:10:34 +00:00
|
|
|
// Warning 6328: (152-170): CHC: Assertion violation happens here.\nCounterexample:\ng = 0\ne = 0\n\nTransaction trace:\nC.constructor()\nState: g = 0\nC.f()\n e() -- untrusted external call\n g() -- untrusted external call
|
|
|
|
// Warning 6328: (262-278): CHC: Assertion violation happens here.\nCounterexample:\ng = 0\ne = 0\n\nTransaction trace:\nC.constructor()\nState: g = 0\nC.f()\n e() -- untrusted external call\n g() -- untrusted external call\n e() -- untrusted external call
|