solidity/test/libsolidity/smtCheckerTests/types/address_delegatecall.sol
2019-04-25 16:24:36 +02:00

24 lines
598 B
Solidity

pragma experimental SMTChecker;
contract C
{
uint x;
mapping (uint => uint) map;
function f(address a, bytes memory data) public {
x = 0;
map[0] = 0;
mapping (uint => uint) storage localMap = map;
(bool success, bytes memory ret) = a.delegatecall(data);
assert(success);
assert(x == 0);
assert(map[0] == 0);
assert(localMap[0] == 0);
}
}
// ====
// EVMVersion: >spuriousDragon
// ----
// Warning: (224-240): Unused local variable.
// Warning: (209-264): Assertion checker does not yet support such variable declarations.
// Warning: (268-283): Assertion violation happens here