aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-02-27 17:08:14 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-03-02 18:51:13 +0800
commit7db2b6fbdb7188596fbb05bea32d686c32e26c7f (patch)
tree23a58056048ae9789642c077e046a25daede85bd /AST.cpp
parent47177542f54a29562d99b27554ed991f318c058a (diff)
downloaddexon-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.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/AST.cpp b/AST.cpp
index 8c1944f9..d18a296d 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -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);