From 1486d215b9c7f94831784ded50342897b65477c9 Mon Sep 17 00:00:00 2001 From: Christian Parpart Date: Mon, 11 Jun 2018 14:06:56 +0200 Subject: libsolidity: turns the var-keyword use from deprecation-warning to an error and include explicit type suggestion --- libsolidity/analysis/SyntaxChecker.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'libsolidity') 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; } -- cgit v1.2.3