aboutsummaryrefslogtreecommitdiffstats
path: root/AST.h
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.h
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.h')
-rw-r--r--AST.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/AST.h b/AST.h
index dd40e023..97e85927 100644
--- a/AST.h
+++ b/AST.h
@@ -144,7 +144,7 @@ public:
Visibility getVisibility() const { return m_visibility == Visibility::Default ? getDefaultVisibility() : m_visibility; }
bool isPublic() const { return getVisibility() >= Visibility::Public; }
bool isVisibleInContract() const { return getVisibility() != Visibility::External; }
- bool isVisibleInDerivedContracts() const { return isVisibleInContract() && getVisibility() >= Visibility::Internal; }
+ virtual bool isVisibleInDerivedContracts() const { return isVisibleInContract() && getVisibility() >= Visibility::Internal; }
/// @returns the scope this declaration resides in. Can be nullptr if it is the global scope.
/// Available only after name and type resolution step.
@@ -409,6 +409,11 @@ public:
ASTPointer<ParameterList> const& getReturnParameterList() const { return m_returnParameters; }
Block const& getBody() const { return *m_body; }
+ virtual bool isVisibleInDerivedContracts() const override
+ {
+ return !isConstructor() && !getName().empty() && isVisibleInContract() &&
+ getVisibility() >= Visibility::Internal;
+ }
virtual TypePointer getType(ContractDefinition const*) const override;
/// Checks that all parameters have allowed types and calls checkTypeRequirements on the body.