diff options
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/ast/Types.cpp | 7 | ||||
-rw-r--r-- | libsolidity/ast/Types.h | 1 |
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; } |