mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow unary plus at the parsing stage
This commit is contained in:
@@ -332,9 +332,7 @@ bool SyntaxChecker::visit(Literal const& _literal)
|
||||
|
||||
bool SyntaxChecker::visit(UnaryOperation const& _operation)
|
||||
{
|
||||
if (_operation.getOperator() == Token::Add)
|
||||
m_errorReporter.syntaxError(9636_error, _operation.location(), "Use of unary + is disallowed.");
|
||||
|
||||
solAssert(_operation.getOperator() != Token::Add);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user