diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-02-26 03:35:55 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-03-02 18:51:13 +0800 |
commit | 5e4665b84deda7943edf1fab0ab32c48c4629fac (patch) | |
tree | 26655e77e3a428539843046262886beb6b44f482 /Types.cpp | |
parent | a5b4f18dd7291e403237061d5f9660db0299601d (diff) | |
download | dexon-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.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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) { |