From df08d79623302d8eb234402c2f4f00f2b06d7646 Mon Sep 17 00:00:00 2001 From: Albert Date: Wed, 28 Nov 2018 13:23:19 +0100 Subject: Fix #5470 Remove unary + from the type system --- libsolidity/ast/Types.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libsolidity/ast') diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index c6b4211a..fd8839ca 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -612,10 +612,9 @@ TypeResult IntegerType::unaryOperatorResult(Token _operator) const // "delete" is ok for all integer types if (_operator == Token::Delete) return TypeResult{make_shared()}; - // we allow +, -, ++ and -- - else if (_operator == Token::Add || _operator == Token::Sub || - _operator == Token::Inc || _operator == Token::Dec || - _operator == Token::BitNot) + // we allow -, ++ and -- + else if (_operator == Token::Sub || _operator == Token::Inc || + _operator == Token::Dec || _operator == Token::BitNot) return TypeResult{shared_from_this()}; else return TypeResult{""}; -- cgit