From 4407a13c1730bf9ed4bcaf00c3f72640f6ddb2a7 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 26 Jun 2017 16:30:13 +0200 Subject: Only allow equality checks for internal function types. --- libsolidity/ast/Types.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity') diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 0234f842..7dc6c4a6 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -2250,7 +2250,7 @@ TypePointer FunctionType::unaryOperatorResult(Token::Value _operator) const TypePointer FunctionType::binaryOperatorResult(Token::Value _operator, TypePointer const& _other) const { - if (_other->category() != category() || !Token::isCompareOp(_operator)) + if (_other->category() != category() || !(_operator == Token::Equal || _operator == Token::NotEqual)) return TypePointer(); FunctionType const& other = dynamic_cast(*_other); if (kind() == Kind::Internal && other.kind() == Kind::Internal && sizeOnStack() == 1 && other.sizeOnStack() == 1) -- cgit v1.2.3