solidity/test/libsolidity/smtCheckerTests/array_members/push_storage_ref_unsafe_aliasing.sol

16 lines
264 B
Solidity
Raw Normal View History

2020-05-18 14:33:27 +00:00
pragma experimental SMTChecker;
contract C {
uint[][] a;
function f() public {
a.push();
a[0].push();
a[0][0] = 16;
uint[] storage b = a[0];
b[0] = 32;
assert(a[0][0] == 16);
}
}
// ----
// Warning 4661: (167-188): Assertion violation happens here