solidity/test/libsolidity/smtCheckerTests/operators/index_access_side_effect.sol

17 lines
287 B
Solidity
Raw Normal View History

2020-08-31 15:16:36 +00:00
pragma experimental SMTChecker;
contract C {
uint[] a;
function h() internal returns (uint[] storage) {
if (a[2] == 0)
a[2] = 3;
return a;
}
function g() public {
h()[2] = 4;
assert(h()[2] == 3);
}
}
// ----
2020-09-09 14:12:55 +00:00
// Warning 6328: (191-210): Assertion violation happens here.