aboutsummaryrefslogtreecommitdiffstats
path: root/AST.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-04-21 19:35:38 +0800
committerchriseth <c@ethdev.com>2015-04-21 21:50:37 +0800
commit8125f93b12243836a3c2edea09715a58d1cc1764 (patch)
treeaa3146a94740d74b1e16711c7829f95374457b13 /AST.h
parente4808305a17f43392e03e29546494d464c5f0895 (diff)
downloaddexon-solidity-8125f93b12243836a3c2edea09715a58d1cc1764.tar.gz
dexon-solidity-8125f93b12243836a3c2edea09715a58d1cc1764.tar.zst
dexon-solidity-8125f93b12243836a3c2edea09715a58d1cc1764.zip
Fix for Contract and Enum types as external function arguments.
Diffstat (limited to 'AST.h')
-rw-r--r--AST.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/AST.h b/AST.h
index 0c133ff1..a75bdf7d 100644
--- a/AST.h
+++ b/AST.h
@@ -143,8 +143,8 @@ public:
ASTString const& getName() const { return *m_name; }
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; }
- virtual bool isVisibleInDerivedContracts() const { return isVisibleInContract() && getVisibility() >= Visibility::Internal; }
+ virtual bool isVisibleInContract() const { return getVisibility() != Visibility::External; }
+ 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.
@@ -156,7 +156,7 @@ public:
/// contract types.
virtual TypePointer getType(ContractDefinition const* m_currentContract = nullptr) const = 0;
virtual bool isLValue() const { return false; }
- virtual bool isPartOfExternalInterface() const { return false; };
+ virtual bool isPartOfExternalInterface() const { return false; }
protected:
virtual Visibility getDefaultVisibility() const { return Visibility::Public; }
@@ -437,10 +437,9 @@ public:
ASTPointer<ParameterList> const& getReturnParameterList() const { return m_returnParameters; }
Block const& getBody() const { return *m_body; }
- virtual bool isVisibleInDerivedContracts() const override
+ virtual bool isVisibleInContract() const override
{
- return !isConstructor() && !getName().empty() && isVisibleInContract() &&
- getVisibility() >= Visibility::Internal;
+ return Declaration::isVisibleInContract() && !isConstructor() && !getName().empty();
}
virtual TypePointer getType(ContractDefinition const*) const override;
virtual bool isPartOfExternalInterface() const override { return isPublic() && !m_isConstructor && !getName().empty(); }