aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-30 05:50:20 +0800
committerChristian <c@ethdev.com>2015-01-30 05:50:20 +0800
commitcfb55901cc963523ca1defe232728f195a818228 (patch)
tree69110bff671995fb49805678d05d0687b4105429 /Types.cpp
parent3701543ae8dd8ffbfd58e5648d45699468f10a55 (diff)
downloaddexon-solidity-cfb55901cc963523ca1defe232728f195a818228.tar.gz
dexon-solidity-cfb55901cc963523ca1defe232728f195a818228.tar.zst
dexon-solidity-cfb55901cc963523ca1defe232728f195a818228.zip
Fallback functions.
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));