aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-01-30 00:28:14 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-01-30 01:21:51 +0800
commit04190798eba7a2996b28aee6d74b1c636f575a02 (patch)
tree2a5fb37440bed96c96ecfcfda494fd1b436b3118 /Types.cpp
parentdcd47be6ca8b408b384dca9737625873ad279464 (diff)
downloaddexon-solidity-04190798eba7a2996b28aee6d74b1c636f575a02.tar.gz
dexon-solidity-04190798eba7a2996b28aee6d74b1c636f575a02.tar.zst
dexon-solidity-04190798eba7a2996b28aee6d74b1c636f575a02.zip
Minor fixes plus a rebase merge fix
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Types.cpp b/Types.cpp
index e7765e1b..38caaf8f 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -591,7 +591,7 @@ u256 StructType::getStorageOffsetOfMember(string const& _name) const
FunctionType::FunctionType(FunctionDefinition const& _function, bool _isInternal):
m_location(_isInternal ? Location::INTERNAL : Location::EXTERNAL),
m_isConstant(_function.isDeclaredConst()),
- m_declaration(&_function)
+ m_declaration(&_function)
{
TypePointers params;
vector<string> paramNames;
@@ -641,6 +641,9 @@ bool FunctionType::operator==(Type const& _other) const
if (m_location != other.m_location)
return false;
+ if (m_isConstant != other.isConstant())
+ return false;
+
if (m_parameterTypes.size() != other.m_parameterTypes.size() ||
m_returnParameterTypes.size() != other.m_returnParameterTypes.size())
return false;
@@ -763,7 +766,7 @@ vector<string> const FunctionType::getReturnParameterTypeNames() const
ASTPointer<ASTString> FunctionType::getDocumentation() const
{
- auto function = dynamic_cast<FunctionDefinition const*>(m_declaration);
+ auto function = dynamic_cast<Documented const*>(m_declaration);
if (function)
return function->getDocumentation();