Adding inheritable members to a contract

This commit is contained in:
Lefteris Karapetsas
2015-03-02 11:51:13 +01:00
parent a5b4f18dd7
commit 5e4665b84d
3 changed files with 33 additions and 3 deletions
+2 -3
View File
@@ -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)
{