diff options
author | Albert <me@albert.sh> | 2018-11-28 20:23:19 +0800 |
---|---|---|
committer | Albert <me@albert.sh> | 2018-12-06 08:54:04 +0800 |
commit | df08d79623302d8eb234402c2f4f00f2b06d7646 (patch) | |
tree | 3249b5876e69d5d209a36ede20dd410061af46ce /libsolidity | |
parent | 15e28fa444843d6b8e5bef81ae9fc73a41ae97f6 (diff) | |
download | dexon-solidity-df08d79623302d8eb234402c2f4f00f2b06d7646.tar.gz dexon-solidity-df08d79623302d8eb234402c2f4f00f2b06d7646.tar.zst dexon-solidity-df08d79623302d8eb234402c2f4f00f2b06d7646.zip |
Fix #5470
Remove unary + from the type system
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/ast/Types.cpp | 7 |
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{""}; |