aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorChristian Parpart <christian@parpart.family>2018-06-11 20:06:56 +0800
committerChristian Parpart <christian@ethereum.org>2018-07-03 16:53:09 +0800
commit1486d215b9c7f94831784ded50342897b65477c9 (patch)
tree3d70d92734eba7d808a1d6a45ea80786f925115b /libsolidity/analysis
parent4649f9202a93f7573d7fb425fbcbdd50e6d4407c (diff)
downloaddexon-solidity-1486d215b9c7f94831784ded50342897b65477c9.tar.gz
dexon-solidity-1486d215b9c7f94831784ded50342897b65477c9.tar.zst
dexon-solidity-1486d215b9c7f94831784ded50342897b65477c9.zip
libsolidity: turns the var-keyword use from deprecation-warning to an error and include explicit type suggestion
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/SyntaxChecker.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp
index c408b393..cd0dc2a4 100644
--- a/libsolidity/analysis/SyntaxChecker.cpp
+++ b/libsolidity/analysis/SyntaxChecker.cpp
@@ -262,14 +262,9 @@ bool SyntaxChecker::visit(FunctionTypeName const& _node)
bool SyntaxChecker::visit(VariableDeclaration const& _declaration)
{
- bool const v050 = m_sourceUnit->annotation().experimentalFeatures.count(ExperimentalFeature::V050);
-
if (!_declaration.typeName())
{
- if (v050)
- m_errorReporter.syntaxError(_declaration.location(), "Use of the \"var\" keyword is deprecated.");
- else
- m_errorReporter.warning(_declaration.location(), "Use of the \"var\" keyword is deprecated.");
+ m_errorReporter.syntaxError(_declaration.location(), "Use of the \"var\" keyword is disallowed.");
}
return true;
}