|
@ -591,7 +591,7 @@ u256 StructType::getStorageOffsetOfMember(string const& _name) const |
|
|
FunctionType::FunctionType(FunctionDefinition const& _function, bool _isInternal): |
|
|
FunctionType::FunctionType(FunctionDefinition const& _function, bool _isInternal): |
|
|
m_location(_isInternal ? Location::INTERNAL : Location::EXTERNAL), |
|
|
m_location(_isInternal ? Location::INTERNAL : Location::EXTERNAL), |
|
|
m_isConstant(_function.isDeclaredConst()), |
|
|
m_isConstant(_function.isDeclaredConst()), |
|
|
m_declaration(&_function) |
|
|
m_declaration(&_function) |
|
|
{ |
|
|
{ |
|
|
TypePointers params; |
|
|
TypePointers params; |
|
|
vector<string> paramNames; |
|
|
vector<string> paramNames; |
|
@ -641,6 +641,9 @@ bool FunctionType::operator==(Type const& _other) const |
|
|
|
|
|
|
|
|
if (m_location != other.m_location) |
|
|
if (m_location != other.m_location) |
|
|
return false; |
|
|
return false; |
|
|
|
|
|
if (m_isConstant != other.isConstant()) |
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
if (m_parameterTypes.size() != other.m_parameterTypes.size() || |
|
|
if (m_parameterTypes.size() != other.m_parameterTypes.size() || |
|
|
m_returnParameterTypes.size() != other.m_returnParameterTypes.size()) |
|
|
m_returnParameterTypes.size() != other.m_returnParameterTypes.size()) |
|
|
return false; |
|
|
return false; |
|
@ -763,7 +766,7 @@ vector<string> const FunctionType::getReturnParameterTypeNames() const |
|
|
|
|
|
|
|
|
ASTPointer<ASTString> FunctionType::getDocumentation() const |
|
|
ASTPointer<ASTString> FunctionType::getDocumentation() const |
|
|
{ |
|
|
{ |
|
|
auto function = dynamic_cast<FunctionDefinition const*>(m_declaration); |
|
|
auto function = dynamic_cast<Documented const*>(m_declaration); |
|
|
if (function) |
|
|
if (function) |
|
|
return function->getDocumentation(); |
|
|
return function->getDocumentation(); |
|
|
|
|
|
|
|
|