aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/AST.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/ast/AST.h')
-rw-r--r--libsolidity/ast/AST.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index ae253f0c..a53987bf 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -218,7 +218,7 @@ public:
/// @param _internal false indicates external interface is concerned, true indicates internal interface is concerned.
/// @returns null when it is not accessible as a function.
- virtual std::shared_ptr<FunctionType> functionType(bool /*_internal*/) const { return {}; }
+ virtual FunctionTypePointer functionType(bool /*_internal*/) const { return {}; }
protected:
virtual Visibility defaultVisibility() const { return Visibility::Public; }
@@ -634,7 +634,7 @@ public:
/// @param _internal false indicates external interface is concerned, true indicates internal interface is concerned.
/// @returns null when it is not accessible as a function.
- virtual std::shared_ptr<FunctionType> functionType(bool /*_internal*/) const override;
+ virtual FunctionTypePointer functionType(bool /*_internal*/) const override;
virtual FunctionDefinitionAnnotation& annotation() const override;
@@ -703,7 +703,7 @@ public:
/// @param _internal false indicates external interface is concerned, true indicates internal interface is concerned.
/// @returns null when it is not accessible as a function.
- virtual std::shared_ptr<FunctionType> functionType(bool /*_internal*/) const override;
+ virtual FunctionTypePointer functionType(bool /*_internal*/) const override;
virtual VariableDeclarationAnnotation& annotation() const override;
@@ -805,7 +805,7 @@ public:
bool isAnonymous() const { return m_anonymous; }
virtual TypePointer type() const override;
- virtual std::shared_ptr<FunctionType> functionType(bool /*_internal*/) const override;
+ virtual FunctionTypePointer functionType(bool /*_internal*/) const override;
virtual EventDefinitionAnnotation& annotation() const override;
@@ -831,6 +831,11 @@ public:
solAssert(false, "MagicVariableDeclaration used inside real AST.");
}
+ virtual FunctionTypePointer functionType(bool) const override
+ {
+ solAssert(m_type->category() == Type::Category::Function, "");
+ return std::dynamic_pointer_cast<FunctionType const>(m_type);
+ }
virtual TypePointer type() const override { return m_type; }
private: