aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-12-06 17:27:09 +0800
committerGitHub <noreply@github.com>2018-12-06 17:27:09 +0800
commit5fde279d2adaa38681a85a550ea1c2cd1e3ae09a (patch)
tree380d6c8d68df976d16665ac566090ed43ac8f13d /libsolidity
parent5a08ae5e719820ba6d34a66187304747cf5c061f (diff)
parenteee2f2b069982fcd76846be98f7361b45d0c46b2 (diff)
downloaddexon-solidity-5fde279d2adaa38681a85a550ea1c2cd1e3ae09a.tar
dexon-solidity-5fde279d2adaa38681a85a550ea1c2cd1e3ae09a.tar.gz
dexon-solidity-5fde279d2adaa38681a85a550ea1c2cd1e3ae09a.tar.bz2
dexon-solidity-5fde279d2adaa38681a85a550ea1c2cd1e3ae09a.tar.lz
dexon-solidity-5fde279d2adaa38681a85a550ea1c2cd1e3ae09a.tar.xz
dexon-solidity-5fde279d2adaa38681a85a550ea1c2cd1e3ae09a.tar.zst
dexon-solidity-5fde279d2adaa38681a85a550ea1c2cd1e3ae09a.zip
Merge pull request #5514 from corollari/develop
Remove unary + from the type system
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/ast/Types.cpp7
1 files changed, 3 insertions, 4 deletions
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<TupleType>()};
- // 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{""};