mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #14139 from ethereum/make-plus-binary-only
Make plus binary only (second attempt)
This commit is contained in:
@@ -1869,6 +1869,10 @@ ASTPointer<Expression> Parser::parseUnaryExpression(
|
||||
ASTNodeFactory nodeFactory = _partiallyParsedExpression ?
|
||||
ASTNodeFactory(*this, _partiallyParsedExpression) : ASTNodeFactory(*this);
|
||||
Token token = m_scanner->currentToken();
|
||||
|
||||
if (token == Token::Add)
|
||||
fatalParserError(9636_error, "Use of unary + is disallowed.");
|
||||
|
||||
if (!_partiallyParsedExpression && (TokenTraits::isUnaryOp(token) || TokenTraits::isCountOp(token)))
|
||||
{
|
||||
// prefix expression
|
||||
|
||||
Reference in New Issue
Block a user