solidity/test/libsolidity/smtCheckerTests/array_members/length_same_after_assignment_3_fail.sol
2020-07-23 18:49:03 +02:00

23 lines
594 B
Solidity

pragma experimental SMTChecker;
contract C {
uint[][] arr;
uint[][] arr2;
function f() public {
uint x = arr[2].length;
uint y = arr[3].length;
uint z = arr.length;
uint t = arr[5].length;
arr[5] = arr[8];
assert(arr[2].length != x);
assert(arr[3].length != y);
assert(arr.length != z);
assert(arr[5].length != t);
}
}
// ----
// Warning 6328: (222-248): Assertion violation happens here
// Warning 6328: (252-278): Assertion violation happens here
// Warning 6328: (282-305): Assertion violation happens here
// Warning 6328: (309-335): Assertion violation happens here