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

13 lines
185 B
Solidity
Raw Normal View History

2019-04-29 11:02:27 +00:00
pragma experimental SMTChecker;
contract C
{
uint[] a;
function g(uint x, uint y) public {
require(x != y);
(a[x], a[y]) = (2, 4);
assert(a[x] == 2);
assert(a[y] == 4);
}
}