diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-02-27 17:08:14 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-03-02 18:51:13 +0800 |
commit | 7db2b6fbdb7188596fbb05bea32d686c32e26c7f (patch) | |
tree | 23a58056048ae9789642c077e046a25daede85bd /AST.cpp | |
parent | 47177542f54a29562d99b27554ed991f318c058a (diff) | |
download | dexon-solidity-7db2b6fbdb7188596fbb05bea32d686c32e26c7f.tar.gz dexon-solidity-7db2b6fbdb7188596fbb05bea32d686c32e26c7f.tar.zst dexon-solidity-7db2b6fbdb7188596fbb05bea32d686c32e26c7f.zip |
VisibleInDerivedContracts() is now virtual()
- Plus an extra test for internal visibility in a base class variable
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -218,22 +218,21 @@ vector<ASTPointer<Declaration>> const& ContractDefinition::getInheritableMembers for (ContractDefinition const* contract: getLinearizedBaseContracts()) { for (ASTPointer<FunctionDefinition> const& f: contract->getDefinedFunctions()) - if (f->isPublic() && !f->isConstructor() && !f->getName().empty() - && memberSeen.count(f->getName()) == 0 && f->isVisibleInDerivedContracts()) + if (memberSeen.count(f->getName()) == 0 && f->isVisibleInDerivedContracts()) { memberSeen.insert(f->getName()); m_inheritableMembers->push_back(f); } for (ASTPointer<VariableDeclaration> const& v: contract->getStateVariables()) - if (v->isPublic() && memberSeen.count(v->getName()) == 0) + if (memberSeen.count(v->getName()) == 0 && v->isVisibleInDerivedContracts()) { memberSeen.insert(v->getName()); m_inheritableMembers->push_back(v); } for (ASTPointer<StructDefinition> const& s: contract->getDefinedStructs()) - if (s->isPublic() && memberSeen.count(s->getName()) == 0) + if (memberSeen.count(s->getName()) == 0 && s->isVisibleInDerivedContracts()) { memberSeen.insert(s->getName()); m_inheritableMembers->push_back(s); |