aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-02-26 03:35:55 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-03-02 18:51:13 +0800
commit5e4665b84deda7943edf1fab0ab32c48c4629fac (patch)
tree26655e77e3a428539843046262886beb6b44f482 /Types.cpp
parenta5b4f18dd7291e403237061d5f9660db0299601d (diff)
downloaddexon-solidity-5e4665b84deda7943edf1fab0ab32c48c4629fac.tar.gz
dexon-solidity-5e4665b84deda7943edf1fab0ab32c48c4629fac.tar.zst
dexon-solidity-5e4665b84deda7943edf1fab0ab32c48c4629fac.zip
Adding inheritable members to a contract
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Types.cpp b/Types.cpp
index adcd2e54..1347c9ea 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -1025,9 +1025,8 @@ MemberList const& TypeType::getMembers() const
if (find(currentBases.begin(), currentBases.end(), &contract) != currentBases.end())
// We are accessing the type of a base contract, so add all public and protected
// functions. Note that this does not add inherited functions on purpose.
- for (ASTPointer<FunctionDefinition> const& f: contract.getDefinedFunctions())
- if (!f->isConstructor() && !f->getName().empty() && f->isVisibleInDerivedContracts())
- members.push_back(make_pair(f->getName(), make_shared<FunctionType>(*f)));
+ for (ASTPointer<Declaration> const& decl: contract.getInheritableMembers())
+ members.push_back(make_pair(decl->getName(), decl->getType()));
}
else if (m_actualType->getCategory() == Category::Enum)
{