[SMTChecker] Added support for public getters through this.

This commit is contained in:
Martin Blicha
2020-12-02 16:06:48 +01:00
parent afe500e399
commit 2ee633f404
36 changed files with 662 additions and 27 deletions
@@ -0,0 +1,19 @@
pragma experimental SMTChecker;
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;
}
}
// ----
// Warning 6328: (185-203): CHC: Assertion violation happens here.
// Warning 6328: (295-311): CHC: Assertion violation happens here.