diff options
Diffstat (limited to 'libsolidity/analysis/SyntaxChecker.cpp')
-rw-r--r-- | libsolidity/analysis/SyntaxChecker.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp index 35d71d85..02e2fdcf 100644 --- a/libsolidity/analysis/SyntaxChecker.cpp +++ b/libsolidity/analysis/SyntaxChecker.cpp @@ -148,3 +148,15 @@ bool SyntaxChecker::visit(PlaceholderStatement const&) return true; } +bool SyntaxChecker::visit(FunctionTypeName const& _node) +{ + for (auto const& decl: _node.parameterTypeList()->parameters()) + if (!decl->name().empty()) + m_errorReporter.warning(decl->location(), "Naming function type parameters is deprecated."); + + for (auto const& decl: _node.returnParameterTypeList()->parameters()) + if (!decl->name().empty()) + m_errorReporter.warning(decl->location(), "Naming function type return parameters is deprecated."); + + return true; +} |