aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/parsing/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/parsing/Parser.cpp')
-rw-r--r--libsolidity/parsing/Parser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp
index ce8a9f01..9a8bb358 100644
--- a/libsolidity/parsing/Parser.cpp
+++ b/libsolidity/parsing/Parser.cpp
@@ -828,6 +828,8 @@ ASTPointer<ParameterList> Parser::parseParameterList(
parameters.push_back(parseVariableDeclaration(options));
while (m_scanner->currentToken() != Token::RParen)
{
+ if (m_scanner->currentToken() == Token::Comma && m_scanner->peekNextToken() == Token::RParen)
+ fatalParserError("Unexpected trailing comma in parameter list.");
expectToken(Token::Comma);
parameters.push_back(parseVariableDeclaration(options));
}