diff options
author | Christian Parpart <christian@ethereum.org> | 2018-07-03 17:10:14 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-07-10 22:27:57 +0800 |
commit | 8ca69ed8d86efe8058cb1001ab4c2609dbe297da (patch) | |
tree | fcc864ba5d5787c2a1295a626f89c04df5219ad3 /libsolidity/analysis | |
parent | 4547b3234893a9f3949130a4e12d86be3b1c0de0 (diff) | |
download | dexon-solidity-8ca69ed8d86efe8058cb1001ab4c2609dbe297da.tar.gz dexon-solidity-8ca69ed8d86efe8058cb1001ab4c2609dbe297da.tar.zst dexon-solidity-8ca69ed8d86efe8058cb1001ab4c2609dbe297da.zip |
defaulting to v0.5.0 behaviour of unary + operator (disallow); also adapting all tests to it
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/SyntaxChecker.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp index cd0dc2a4..63f8fac3 100644 --- a/libsolidity/analysis/SyntaxChecker.cpp +++ b/libsolidity/analysis/SyntaxChecker.cpp @@ -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; } |