From 639b85f4987db13bebdd751b205424810a7daab7 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 27 Sep 2017 19:27:36 +0200 Subject: [PATCH] Fix source location of VariableDeclarationStatement. --- Changelog.md | 1 + libsolidity/parsing/Parser.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/Changelog.md b/Changelog.md index 9755d2d36..b16438109 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,7 @@ Features: * Parser: Better error message for unexpected trailing comma in parameter lists. Bugfixes: + * Parser: Fix source location of VariableDeclarationStatement. ### 0.4.17 (2017-09-21) diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index 9a8bb3585..821e81d22 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -1133,6 +1133,7 @@ ASTPointer Parser::parseVariableDeclarationStateme options.allowVar = true; options.allowLocationSpecifier = true; variables.push_back(parseVariableDeclaration(options, _lookAheadArrayType)); + nodeFactory.setEndPositionFromNode(variables.back()); } if (m_scanner->currentToken() == Token::Assign) {