mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Test case for the buggy behaviour.
This commit is contained in:
parent
1d7b4704bb
commit
d92ed3fd29
@ -0,0 +1,23 @@
|
||||
pragma abicoder v2;
|
||||
|
||||
contract C {
|
||||
function h(uint[][] calldata a) public {
|
||||
abi.encode(a);
|
||||
}
|
||||
struct S { uint[] x; }
|
||||
function f(S calldata a) public {
|
||||
abi.encode(a);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// revertStrings: debug
|
||||
// ----
|
||||
// h(uint256[][]): 0x20, 1, 0x20, 0 ->
|
||||
// h(uint256[][]): 0x20, 1, 0x20, 1 ->
|
||||
// h(uint256[][]): 0x20, 1, 0x20, 2 ->
|
||||
// h(uint256[][]): 0x20, 1, 0x20, 3 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
|
||||
// f((uint256[])): 0x20, 0x20, 0 ->
|
||||
// f((uint256[])): 0x20, 0x20, 1 ->
|
||||
// f((uint256[])): 0x20, 0x20, 2 ->
|
||||
// f((uint256[])): 0x20, 0x20, 3 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
|
Loading…
Reference in New Issue
Block a user