solidity/test/libsolidity/syntaxTests/tupleAssignments/nowarn_swap_storage_pointers.sol

11 lines
238 B
Solidity
Raw Normal View History

2018-05-04 14:10:25 +00:00
contract C {
struct S { uint a; uint b; }
S x; S y;
function f() public {
S storage x_local = x;
S storage y_local = y;
S storage z_local = x;
(x, y_local, x_local, z_local) = (y, x_local, y_local, y);
}
}