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.h | |
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.h')
-rw-r--r-- | AST.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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. |