Merge pull request #8414 from ethereum/sol2yul-func-type-conversion

[Sol2Yul] Implements function-to-function cast.
This commit is contained in:
Christian Parpart
2020-03-09 11:31:44 +01:00
committed by GitHub
3 changed files with 54 additions and 1 deletions
@@ -47,6 +47,7 @@ using namespace std;
using namespace solidity;
using namespace solidity::util;
using namespace solidity::frontend;
using namespace std::string_literals;
namespace
{
@@ -1212,7 +1213,7 @@ void IRGeneratorForStatements::appendExternalFunctionCall(
argumentTypes.emplace_back(&type(*arg));
argumentStrings.emplace_back(IRVariable(*arg).commaSeparatedList());
}
string argumentString = ", " + joinHumanReadable(argumentStrings);
string argumentString = argumentStrings.empty() ? ""s : (", " + joinHumanReadable(argumentStrings));
solUnimplementedAssert(funKind != FunctionType::Kind::ECRecover, "");