mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
13 lines
448 B
Solidity
13 lines
448 B
Solidity
contract C {
|
|
function f(uint256 start, uint256 end, uint256[] calldata arr) external pure {
|
|
arr[start:end];
|
|
}
|
|
}
|
|
// ====
|
|
// EVMVersion: >=byzantium
|
|
// compileViaYul: also
|
|
// revertStrings: debug
|
|
// ----
|
|
// f(uint256,uint256,uint256[]): 2, 1, 0x80, 3, 1, 2, 3 -> FAILURE, hex"08c379a0", 0x20, 22, "Slice starts after end"
|
|
// f(uint256,uint256,uint256[]): 1, 5, 0x80, 3, 1, 2, 3 -> FAILURE, hex"08c379a0", 0x20, 28, "Slice is greater than length"
|