aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-11-09 16:36:38 +0800
committerchriseth <c@ethdev.com>2016-11-16 21:37:18 +0800
commitf21f794f3c380c9382ace4908c38d0f6c776ae17 (patch)
treed177e5f1144a66c9352d8d23e06bd576ffca9aa9 /libsolidity/ast
parentc9f9b2ab4d421e99055425ace5deeb76d8f4fdd2 (diff)
downloaddexon-solidity-f21f794f3c380c9382ace4908c38d0f6c776ae17.tar.gz
dexon-solidity-f21f794f3c380c9382ace4908c38d0f6c776ae17.tar.zst
dexon-solidity-f21f794f3c380c9382ace4908c38d0f6c776ae17.zip
delete for function types
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.cpp7
-rw-r--r--libsolidity/ast/Types.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 8cc125fe..395faf55 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -1897,6 +1897,13 @@ bool FunctionType::operator==(Type const& _other) const
return true;
}
+TypePointer FunctionType::unaryOperatorResult(Token::Value _operator) const
+{
+ if (_operator == Token::Value::Delete)
+ return make_shared<TupleType>();
+ return TypePointer();
+}
+
string FunctionType::toString(bool _short) const
{
string name = "function (";
diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h
index 691ddf29..9831bc42 100644
--- a/libsolidity/ast/Types.h
+++ b/libsolidity/ast/Types.h
@@ -892,6 +892,7 @@ public:
TypePointer selfType() const;
virtual bool operator==(Type const& _other) const override;
+ virtual TypePointer unaryOperatorResult(Token::Value _operator) const override;
virtual std::string toString(bool _short) const override;
virtual unsigned calldataEncodedSize(bool _padded) const override;
virtual bool canBeStored() const override { return m_location == Location::Internal || m_location == Location::External; }