aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/SyntaxChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/analysis/SyntaxChecker.cpp')
-rw-r--r--libsolidity/analysis/SyntaxChecker.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp
index 396058f4..cd0dc2a4 100644
--- a/libsolidity/analysis/SyntaxChecker.cpp
+++ b/libsolidity/analysis/SyntaxChecker.cpp
@@ -255,35 +255,24 @@ bool SyntaxChecker::visit(FunctionTypeName const& _node)
for (auto const& decl: _node.returnParameterTypeList()->parameters())
if (!decl->name().empty())
- m_errorReporter.warning(decl->location(), "Naming function type return parameters is deprecated.");
+ m_errorReporter.syntaxError(decl->location(), "Return parameters in function types may not be named.");
return true;
}
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;
}
bool SyntaxChecker::visit(StructDefinition const& _struct)
{
- bool const v050 = m_sourceUnit->annotation().experimentalFeatures.count(ExperimentalFeature::V050);
-
if (_struct.members().empty())
- {
- if (v050)
- m_errorReporter.syntaxError(_struct.location(), "Defining empty structs is disallowed.");
- else
- m_errorReporter.warning(_struct.location(), "Defining empty structs is deprecated.");
- }
+ m_errorReporter.syntaxError(_struct.location(), "Defining empty structs is disallowed.");
+
return true;
}