defaulting to v0.5.0 behaviour of unary + operator (disallow); also adapting all tests to it

This commit is contained in:
Christian Parpart
2018-07-10 16:27:57 +02:00
committed by chriseth
parent 4547b32348
commit 8ca69ed8d8
5 changed files with 4 additions and 29 deletions
+2 -8
View File
@@ -192,15 +192,9 @@ bool SyntaxChecker::visit(Throw const& _throwStatement)
bool SyntaxChecker::visit(UnaryOperation const& _operation)
{
bool const v050 = m_sourceUnit->annotation().experimentalFeatures.count(ExperimentalFeature::V050);
if (_operation.getOperator() == Token::Add)
{
if (v050)
m_errorReporter.syntaxError(_operation.location(), "Use of unary + is deprecated.");
else
m_errorReporter.warning(_operation.location(), "Use of unary + is deprecated.");
}
m_errorReporter.syntaxError(_operation.location(), "Use of unary + is disallowed.");
return true;
}