mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
18 lines
384 B
Solidity
18 lines
384 B
Solidity
pragma abicoder v2;
|
|
|
|
library L {
|
|
function reverse(uint[2] calldata _a) internal pure returns (uint, uint) {
|
|
return (_a[1], _a[0]);
|
|
}
|
|
}
|
|
|
|
contract C {
|
|
using L for uint[2];
|
|
|
|
function test(uint, uint[2] calldata _a, uint) external pure returns (uint, uint) {
|
|
return _a.reverse();
|
|
}
|
|
}
|
|
// ----
|
|
// test(uint256,uint256[2],uint256): 7, 66, 77, 4 -> 77, 66
|