aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/AST.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-12-30 20:44:09 +0800
committerchriseth <chris@ethereum.org>2018-04-12 19:09:37 +0800
commit17fc0f54b5dbf6b49e0500e3fca7b681316071f6 (patch)
treea1e3b5bd6c577ee9a2bba1d62992a325e23d81fb /libsolidity/ast/AST.cpp
parentc3dc67d0e0c311a907e7a27e159f9159d78af949 (diff)
downloaddexon-solidity-17fc0f54b5dbf6b49e0500e3fca7b681316071f6.tar.gz
dexon-solidity-17fc0f54b5dbf6b49e0500e3fca7b681316071f6.tar.zst
dexon-solidity-17fc0f54b5dbf6b49e0500e3fca7b681316071f6.zip
Use FunctionTypePointer (adds ``const``).
Diffstat (limited to 'libsolidity/ast/AST.cpp')
-rw-r--r--libsolidity/ast/AST.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp
index d8ad009d..80f5d642 100644
--- a/libsolidity/ast/AST.cpp
+++ b/libsolidity/ast/AST.cpp
@@ -297,7 +297,7 @@ ContractDefinition::ContractKind FunctionDefinition::inContractKind() const
return contractDef->contractKind();
}
-shared_ptr<FunctionType> FunctionDefinition::functionType(bool _internal) const
+FunctionTypePointer FunctionDefinition::functionType(bool _internal) const
{
if (_internal)
{
@@ -338,6 +338,7 @@ shared_ptr<FunctionType> FunctionDefinition::functionType(bool _internal) const
TypePointer FunctionDefinition::type() const
{
+ solAssert(visibility() != Declaration::Visibility::External, "");
return make_shared<FunctionType>(*this);
}
@@ -379,7 +380,7 @@ TypePointer EventDefinition::type() const
return make_shared<FunctionType>(*this);
}
-std::shared_ptr<FunctionType> EventDefinition::functionType(bool _internal) const
+FunctionTypePointer EventDefinition::functionType(bool _internal) const
{
if (_internal)
return make_shared<FunctionType>(*this);
@@ -484,7 +485,7 @@ TypePointer VariableDeclaration::type() const
return annotation().type;
}
-shared_ptr<FunctionType> VariableDeclaration::functionType(bool _internal) const
+FunctionTypePointer VariableDeclaration::functionType(bool _internal) const
{
if (_internal)
return {};