[SMTChecker] Support this as address

This commit is contained in:
Leonardo Alt
2019-04-18 17:56:52 +02:00
parent f077b15357
commit dd1afeba52
9 changed files with 130 additions and 2 deletions
@@ -9,5 +9,4 @@ contract C {
}
}
// ----
// Warning: (99-103): Assertion checker does not yet support the type of this variable.
// Warning: (141-144): Assertion checker does not support recursive function calls.
@@ -0,0 +1,10 @@
pragma experimental SMTChecker;
contract C
{
function f(address a) public view {
assert(a == address(this));
}
}
// ----
// Warning: (85-111): Assertion violation happens here
@@ -0,0 +1,11 @@
pragma experimental SMTChecker;
contract C
{
address thisAddr;
function f(address a) public {
require(a == address(this));
thisAddr = a;
assert(thisAddr == address(this));
}
}