aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-06-26 22:30:13 +0800
committerchriseth <chris@ethereum.org>2017-06-26 22:30:37 +0800
commit4407a13c1730bf9ed4bcaf00c3f72640f6ddb2a7 (patch)
tree1de44210b9781d51892c82a616b5ca3cb7b1a6ca /libsolidity
parentf47e6e90fb55066ff602a1448fc2d3f650449559 (diff)
downloaddexon-solidity-4407a13c1730bf9ed4bcaf00c3f72640f6ddb2a7.tar
dexon-solidity-4407a13c1730bf9ed4bcaf00c3f72640f6ddb2a7.tar.gz
dexon-solidity-4407a13c1730bf9ed4bcaf00c3f72640f6ddb2a7.tar.bz2
dexon-solidity-4407a13c1730bf9ed4bcaf00c3f72640f6ddb2a7.tar.lz
dexon-solidity-4407a13c1730bf9ed4bcaf00c3f72640f6ddb2a7.tar.xz
dexon-solidity-4407a13c1730bf9ed4bcaf00c3f72640f6ddb2a7.tar.zst
dexon-solidity-4407a13c1730bf9ed4bcaf00c3f72640f6ddb2a7.zip
Only allow equality checks for internal function types.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/ast/Types.cpp2
1 files changed, 1 insertions, 1 deletions
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<FunctionType const&>(*_other);
if (kind() == Kind::Internal && other.kind() == Kind::Internal && sizeOnStack() == 1 && other.sizeOnStack() == 1)