mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Split calldataEncodedSize into calldataEncodedSize, calldataEncodedTailSize and calldataHeadSize and fix all usages.
This commit is contained in:
committed by
Daniel Kirchner
parent
d44f680a51
commit
15631a7fbe
@@ -0,0 +1,23 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract C {
|
||||
struct A {
|
||||
uint256 a;
|
||||
uint256[] b;
|
||||
}
|
||||
struct B {
|
||||
A a;
|
||||
uint256 b;
|
||||
}
|
||||
function g(B calldata b) external pure returns(uint256) {
|
||||
return b.b;
|
||||
}
|
||||
function f() public view returns(uint256, uint256) {
|
||||
uint256[] memory arr = new uint256[](20);
|
||||
arr[0] = 31; arr[2] = 84;
|
||||
B memory b = B(A(420, arr), 11);
|
||||
return (b.b, this.g(b));
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// f() -> 11, 11
|
||||
Reference in New Issue
Block a user