mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixup! Calldata validation tests
This commit is contained in:
parent
d066dd2bc0
commit
123a410795
@ -13,13 +13,13 @@ contract C {
|
||||
}
|
||||
|
||||
function f_which(uint[] calldata a, uint[2] calldata b, uint which) public returns (bytes memory) {
|
||||
return abi.encode(a[which], b[1]);
|
||||
return abi.encode(a[which], b[1]);
|
||||
}
|
||||
|
||||
function f_storage(uint[] calldata a, uint[2] calldata b ) public returns (bytes memory) {
|
||||
s = a;
|
||||
n = b;
|
||||
return abi.encode(s);
|
||||
return abi.encode(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,15 +5,15 @@ contract C {
|
||||
uint[2] n;
|
||||
|
||||
function f_memory(uint[][] calldata a) public returns (uint[][] memory) {
|
||||
return a;
|
||||
return a;
|
||||
}
|
||||
|
||||
function f_encode(uint[][] calldata a) public returns (bytes memory) {
|
||||
return abi.encode(a);
|
||||
return abi.encode(a);
|
||||
}
|
||||
|
||||
function f_which(uint[][] calldata a, uint which) public returns (uint[] memory) {
|
||||
return a[which];
|
||||
return a[which];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,11 +5,11 @@ contract C {
|
||||
uint[2] bTmp;
|
||||
|
||||
function f_memory(uint[] calldata a) public returns (uint[] memory) {
|
||||
return a;
|
||||
return a;
|
||||
}
|
||||
|
||||
function f_encode(uint[] calldata a) public returns (bytes memory) {
|
||||
return abi.encode(a);
|
||||
return abi.encode(a);
|
||||
}
|
||||
|
||||
function f_storage(uint[] calldata a) public returns (bytes memory) {
|
||||
|
Loading…
Reference in New Issue
Block a user