mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove unary plus.
This commit is contained in:
parent
89919e47d3
commit
4be9b409de
@ -220,8 +220,6 @@ optional<rational> ConstantEvaluator::evaluateUnaryOperator(Token _operator, rat
|
|||||||
return nullopt;
|
return nullopt;
|
||||||
else
|
else
|
||||||
return ~_input.numerator();
|
return ~_input.numerator();
|
||||||
case Token::Add:
|
|
||||||
return +_input;
|
|
||||||
case Token::Sub:
|
case Token::Sub:
|
||||||
return -_input;
|
return -_input;
|
||||||
default:
|
default:
|
||||||
|
@ -7,3 +7,4 @@ contract test {
|
|||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// SyntaxError 9636: (70-75): Use of unary + is disallowed.
|
// SyntaxError 9636: (70-75): Use of unary + is disallowed.
|
||||||
|
// TypeError 4907: (70-75): Unary operator + cannot be applied to type rational_const 13 / 4
|
||||||
|
Loading…
Reference in New Issue
Block a user