solidity/test/libsolidity/syntaxTests/array/slice/calldata_dynamic_encode.sol

8 lines
162 B
Solidity
Raw Normal View History

contract C {
function f(uint256[] calldata x) external pure {
abi.encode(x[1:2]);
}
}
// ----
// TypeError: (85-91): This type cannot be encoded.