aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-07-16 22:25:22 +0800
committerGitHub <noreply@github.com>2018-07-16 22:25:22 +0800
commit29dae15c50277d52087f2eddea7d2033754e2c1f (patch)
tree321fa187d152510403c005b0c44738453f6c8539 /libsolidity/analysis
parentb38c26bb0cbbb7fe80c99fc757cb6150c61a56b4 (diff)
parentbdac82ecdbb6a4d27e9c5b11ce48d2d653a652e6 (diff)
downloaddexon-solidity-29dae15c50277d52087f2eddea7d2033754e2c1f.tar.gz
dexon-solidity-29dae15c50277d52087f2eddea7d2033754e2c1f.tar.zst
dexon-solidity-29dae15c50277d52087f2eddea7d2033754e2c1f.zip
Merge pull request #4481 from ethereum/disallow-throw
[BREAKING] Deprecate the throw statement
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/SyntaxChecker.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp
index e33aafed..fba18a45 100644
--- a/libsolidity/analysis/SyntaxChecker.cpp
+++ b/libsolidity/analysis/SyntaxChecker.cpp
@@ -175,18 +175,10 @@ bool SyntaxChecker::visit(Break const& _breakStatement)
bool SyntaxChecker::visit(Throw const& _throwStatement)
{
- bool const v050 = m_sourceUnit->annotation().experimentalFeatures.count(ExperimentalFeature::V050);
-
- if (v050)
- m_errorReporter.syntaxError(
- _throwStatement.location(),
- "\"throw\" is deprecated in favour of \"revert()\", \"require()\" and \"assert()\"."
- );
- else
- m_errorReporter.warning(
- _throwStatement.location(),
- "\"throw\" is deprecated in favour of \"revert()\", \"require()\" and \"assert()\"."
- );
+ m_errorReporter.syntaxError(
+ _throwStatement.location(),
+ "\"throw\" is deprecated in favour of \"revert()\", \"require()\" and \"assert()\"."
+ );
return true;
}