solidity/test/libsolidity/smtCheckerTests/types/mapping_as_parameter_1.sol

16 lines
382 B
Solidity

pragma experimental SMTChecker;
contract c {
mapping(uint => uint) x;
function f(mapping(uint => uint) storage map, uint index, uint value) internal {
map[index] = value;
}
function g(uint a, uint b) public {
f(x, a, b);
// False positive since aliasing is not yet supported.
assert(x[a] == b);
}
}
// ----
// Warning 4661: (289-306): Assertion violation happens here