mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Added support for public getters through this.
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user