Fix static arrays with dynamic elements not being treated as dynamic in FunctionType::returnParameterTypesWithoutDynamicTypes()

This commit is contained in:
Kamil Śliwak
2020-09-16 11:15:52 +02:00
parent b08b76ffca
commit 2916ae5bda
3 changed files with 25 additions and 1 deletions
@@ -0,0 +1,23 @@
pragma experimental ABIEncoderV2;
contract C {
struct S {
bool[] b;
}
function f() public returns (uint256, bool[][2] memory, S[2] memory, uint256) {
return (
5,
[new bool[](1), new bool[](2)],
[S(new bool[](2)), S(new bool[](5))],
6
);
}
function g() public returns (uint256, uint256) {
(uint256 a, , , uint256 b) = this.f();
return (a, b);
}
}
// ----
// g() -> 5, 6