mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Support this as address
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user