diff options
-rw-r--r-- | AST.cpp | 7 | ||||
-rw-r--r-- | Types.cpp | 2 |
2 files changed, 8 insertions, 1 deletions
@@ -231,6 +231,13 @@ vector<ASTPointer<Declaration>> const& ContractDefinition::getInheritableMembers memberSeen.insert(v->getName()); m_inheritableMembers->push_back(v); } + + for (ASTPointer<StructDefinition> const& s: contract->getDefinedStructs()) + if (s->isPublic() && memberSeen.count(s->getName()) == 0) + { + memberSeen.insert(s->getName()); + m_inheritableMembers->push_back(s); + } } } return *m_inheritableMembers; @@ -1024,7 +1024,7 @@ MemberList const& TypeType::getMembers() const vector<ContractDefinition const*> currentBases = m_currentContract->getLinearizedBaseContracts(); 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. + // members. Note that this does not add inherited functions on purpose. for (ASTPointer<Declaration> const& decl: contract.getInheritableMembers()) members.push_back(make_pair(decl->getName(), decl->getType())); } |