mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use FunctionTypePointer (adds `const
`).
This commit is contained in:
parent
c3dc67d0e0
commit
17fc0f54b5
@ -297,7 +297,7 @@ ContractDefinition::ContractKind FunctionDefinition::inContractKind() const
|
|||||||
return contractDef->contractKind();
|
return contractDef->contractKind();
|
||||||
}
|
}
|
||||||
|
|
||||||
shared_ptr<FunctionType> FunctionDefinition::functionType(bool _internal) const
|
FunctionTypePointer FunctionDefinition::functionType(bool _internal) const
|
||||||
{
|
{
|
||||||
if (_internal)
|
if (_internal)
|
||||||
{
|
{
|
||||||
@ -338,6 +338,7 @@ shared_ptr<FunctionType> FunctionDefinition::functionType(bool _internal) const
|
|||||||
|
|
||||||
TypePointer FunctionDefinition::type() const
|
TypePointer FunctionDefinition::type() const
|
||||||
{
|
{
|
||||||
|
solAssert(visibility() != Declaration::Visibility::External, "");
|
||||||
return make_shared<FunctionType>(*this);
|
return make_shared<FunctionType>(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,7 +380,7 @@ TypePointer EventDefinition::type() const
|
|||||||
return make_shared<FunctionType>(*this);
|
return make_shared<FunctionType>(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<FunctionType> EventDefinition::functionType(bool _internal) const
|
FunctionTypePointer EventDefinition::functionType(bool _internal) const
|
||||||
{
|
{
|
||||||
if (_internal)
|
if (_internal)
|
||||||
return make_shared<FunctionType>(*this);
|
return make_shared<FunctionType>(*this);
|
||||||
@ -484,7 +485,7 @@ TypePointer VariableDeclaration::type() const
|
|||||||
return annotation().type;
|
return annotation().type;
|
||||||
}
|
}
|
||||||
|
|
||||||
shared_ptr<FunctionType> VariableDeclaration::functionType(bool _internal) const
|
FunctionTypePointer VariableDeclaration::functionType(bool _internal) const
|
||||||
{
|
{
|
||||||
if (_internal)
|
if (_internal)
|
||||||
return {};
|
return {};
|
||||||
|
@ -218,7 +218,7 @@ public:
|
|||||||
|
|
||||||
/// @param _internal false indicates external interface is concerned, true indicates internal interface is concerned.
|
/// @param _internal false indicates external interface is concerned, true indicates internal interface is concerned.
|
||||||
/// @returns null when it is not accessible as a function.
|
/// @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:
|
protected:
|
||||||
virtual Visibility defaultVisibility() const { return Visibility::Public; }
|
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.
|
/// @param _internal false indicates external interface is concerned, true indicates internal interface is concerned.
|
||||||
/// @returns null when it is not accessible as a function.
|
/// @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;
|
virtual FunctionDefinitionAnnotation& annotation() const override;
|
||||||
|
|
||||||
@ -703,7 +703,7 @@ public:
|
|||||||
|
|
||||||
/// @param _internal false indicates external interface is concerned, true indicates internal interface is concerned.
|
/// @param _internal false indicates external interface is concerned, true indicates internal interface is concerned.
|
||||||
/// @returns null when it is not accessible as a function.
|
/// @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;
|
virtual VariableDeclarationAnnotation& annotation() const override;
|
||||||
|
|
||||||
@ -805,7 +805,7 @@ public:
|
|||||||
bool isAnonymous() const { return m_anonymous; }
|
bool isAnonymous() const { return m_anonymous; }
|
||||||
|
|
||||||
virtual TypePointer type() const override;
|
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;
|
virtual EventDefinitionAnnotation& annotation() const override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user