|
@ -144,7 +144,7 @@ public: |
|
|
Visibility getVisibility() const { return m_visibility == Visibility::Default ? getDefaultVisibility() : m_visibility; } |
|
|
Visibility getVisibility() const { return m_visibility == Visibility::Default ? getDefaultVisibility() : m_visibility; } |
|
|
bool isPublic() const { return getVisibility() >= Visibility::Public; } |
|
|
bool isPublic() const { return getVisibility() >= Visibility::Public; } |
|
|
bool isVisibleInContract() const { return getVisibility() != Visibility::External; } |
|
|
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.
|
|
|
/// @returns the scope this declaration resides in. Can be nullptr if it is the global scope.
|
|
|
/// Available only after name and type resolution step.
|
|
|
/// Available only after name and type resolution step.
|
|
@ -247,6 +247,9 @@ public: |
|
|
/// as intended for use by the ABI.
|
|
|
/// as intended for use by the ABI.
|
|
|
std::map<FixedHash<4>, FunctionTypePointer> getInterfaceFunctions() const; |
|
|
std::map<FixedHash<4>, FunctionTypePointer> getInterfaceFunctions() const; |
|
|
|
|
|
|
|
|
|
|
|
/// @returns a list of the inheritable members of this contract
|
|
|
|
|
|
std::vector<Declaration const*> const& getInheritableMembers() const; |
|
|
|
|
|
|
|
|
/// List of all (direct and indirect) base contracts in order from derived to base, including
|
|
|
/// List of all (direct and indirect) base contracts in order from derived to base, including
|
|
|
/// the contract itself. Available after name resolution
|
|
|
/// the contract itself. Available after name resolution
|
|
|
std::vector<ContractDefinition const*> const& getLinearizedBaseContracts() const { return m_linearizedBaseContracts; } |
|
|
std::vector<ContractDefinition const*> const& getLinearizedBaseContracts() const { return m_linearizedBaseContracts; } |
|
@ -273,6 +276,7 @@ private: |
|
|
std::vector<ContractDefinition const*> m_linearizedBaseContracts; |
|
|
std::vector<ContractDefinition const*> m_linearizedBaseContracts; |
|
|
mutable std::unique_ptr<std::vector<std::pair<FixedHash<4>, FunctionTypePointer>>> m_interfaceFunctionList; |
|
|
mutable std::unique_ptr<std::vector<std::pair<FixedHash<4>, FunctionTypePointer>>> m_interfaceFunctionList; |
|
|
mutable std::unique_ptr<std::vector<ASTPointer<EventDefinition>>> m_interfaceEvents; |
|
|
mutable std::unique_ptr<std::vector<ASTPointer<EventDefinition>>> m_interfaceEvents; |
|
|
|
|
|
mutable std::unique_ptr<std::vector<Declaration const*>> m_inheritableMembers; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
class InheritanceSpecifier: public ASTNode |
|
|
class InheritanceSpecifier: public ASTNode |
|
@ -405,6 +409,11 @@ public: |
|
|
ASTPointer<ParameterList> const& getReturnParameterList() const { return m_returnParameters; } |
|
|
ASTPointer<ParameterList> const& getReturnParameterList() const { return m_returnParameters; } |
|
|
Block const& getBody() const { return *m_body; } |
|
|
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; |
|
|
virtual TypePointer getType(ContractDefinition const*) const override; |
|
|
|
|
|
|
|
|
/// Checks that all parameters have allowed types and calls checkTypeRequirements on the body.
|
|
|
/// Checks that all parameters have allowed types and calls checkTypeRequirements on the body.
|
|
|