mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix and updated test.
This commit is contained in:
@@ -1160,10 +1160,22 @@ void IRGeneratorForStatements::endVisit(FunctionCall const& _functionCall)
|
||||
for (auto const& argument: argumentsOfEncodeFunction)
|
||||
{
|
||||
argumentTypes.emplace_back(&type(*argument));
|
||||
targetTypes.emplace_back(type(*argument).fullEncodingType(false, true, isPacked));
|
||||
argumentVars += IRVariable(*argument).stackSlots();
|
||||
}
|
||||
|
||||
if (functionType->kind() == FunctionType::Kind::ABIEncodeCall)
|
||||
{
|
||||
auto encodedFunctionType = dynamic_cast<FunctionType const*>(arguments.front()->annotation().type);
|
||||
solAssert(encodedFunctionType);
|
||||
encodedFunctionType = encodedFunctionType->asExternallyCallableFunction(false);
|
||||
solAssert(encodedFunctionType);
|
||||
targetTypes = encodedFunctionType->parameterTypes();
|
||||
}
|
||||
else
|
||||
for (auto const& argument: argumentsOfEncodeFunction)
|
||||
targetTypes.emplace_back(type(*argument).fullEncodingType(false, true, isPacked));
|
||||
|
||||
|
||||
if (functionType->kind() == FunctionType::Kind::ABIEncodeCall)
|
||||
{
|
||||
auto const& selectorType = dynamic_cast<FunctionType const&>(type(*arguments.front()));
|
||||
|
||||
Reference in New Issue
Block a user