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

18 lines
249 B
Solidity
Raw Normal View History

2020-04-14 09:09:38 +00:00
contract C {
uint[] arr;
2021-03-23 18:15:14 +00:00
constructor() {
arr.push();
arr.push();
arr.push();
arr.push();
}
2020-04-14 09:09:38 +00:00
function f() public view {
uint[] memory arr2 = arr;
arr2[2] = 3;
assert(arr.length == arr2.length);
}
}
2021-03-31 15:11:54 +00:00
// ====
// SMTEngine: all
// ----