aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2015-01-30 07:46:19 +0800
committerGav Wood <i@gavwood.com>2015-01-30 07:46:19 +0800
commitf46df7cb92bba6f30184cc47af3aab8cda672048 (patch)
tree13f827931b25db3f931aff495faef6d1fc41f547 /Types.cpp
parenta604202f33f1f7dc3abda1080e1bc02b2a2cbcb3 (diff)
parentcfb55901cc963523ca1defe232728f195a818228 (diff)
downloaddexon-solidity-f46df7cb92bba6f30184cc47af3aab8cda672048.tar.gz
dexon-solidity-f46df7cb92bba6f30184cc47af3aab8cda672048.tar.zst
dexon-solidity-f46df7cb92bba6f30184cc47af3aab8cda672048.zip
Merge branch 'sol_defaultFunction' of https://github.com/chriseth/cpp-ethereum into chriseth-sol_defaultFunction
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Types.cpp b/Types.cpp
index bebb4be1..afc1c1db 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -494,7 +494,7 @@ MemberList const& ContractType::getMembers() const
{
for (ContractDefinition const* base: m_contract.getLinearizedBaseContracts())
for (ASTPointer<FunctionDefinition> const& function: base->getDefinedFunctions())
- if (!function->isConstructor())
+ if (!function->isConstructor() && !function->getName().empty())
members.insert(make_pair(function->getName(), make_shared<FunctionType>(*function, true)));
}
else
@@ -808,7 +808,7 @@ MemberList const& TypeType::getMembers() const
// We are accessing the type of a base contract, so add all public and private
// functions. Note that this does not add inherited functions on purpose.
for (ASTPointer<FunctionDefinition> const& f: contract.getDefinedFunctions())
- if (!f->isConstructor())
+ if (!f->isConstructor() && !f->getName().empty())
members[f->getName()] = make_shared<FunctionType>(*f);
}
m_members.reset(new MemberList(members));