mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Small issues with Canonical Function Signature
- Also added an extra test
This commit is contained in:
@@ -452,13 +452,12 @@ unsigned FunctionType::getSizeOnStack() const
|
||||
}
|
||||
}
|
||||
|
||||
std::string FunctionType::getCanonicalSignature() const
|
||||
string FunctionType::getCanonicalSignature() const
|
||||
{
|
||||
auto parameters = getParameterTypes();
|
||||
std::string ret = "NAME("; //TODO: how to get function name from FunctionType
|
||||
string ret = "(";
|
||||
|
||||
for (auto it = parameters.cbegin(); it != parameters.cend(); ++it)
|
||||
ret += (*it)->toString() + (it + 1 == m_parameterTypes.end() ? "" : ",");
|
||||
for (auto it = m_parameterTypes.cbegin(); it != m_parameterTypes.cend(); ++it)
|
||||
ret += (*it)->toString() + (it + 1 == m_parameterTypes.cend() ? "" : ",");
|
||||
|
||||
return ret + ")";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user