diff options
Refactoring to allow multi-variable declarations.
Diffstat (limited to 'libsolidity/NameAndTypeResolver.cpp')
-rw-r--r-- | libsolidity/NameAndTypeResolver.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/NameAndTypeResolver.cpp b/libsolidity/NameAndTypeResolver.cpp index 0ce20f3c..0d2c3b02 100644 --- a/libsolidity/NameAndTypeResolver.cpp +++ b/libsolidity/NameAndTypeResolver.cpp @@ -350,7 +350,9 @@ void DeclarationRegistrationHelper::endVisit(VariableDeclarationStatement& _vari // Register the local variables with the function // This does not fit here perfectly, but it saves us another AST visit. solAssert(m_currentFunction, "Variable declaration without function."); - m_currentFunction->addLocalVariable(_variableDeclarationStatement.declaration()); + for (ASTPointer<VariableDeclaration> const& var: _variableDeclarationStatement.declarations()) + if (var) + m_currentFunction->addLocalVariable(*var); } bool DeclarationRegistrationHelper::visit(VariableDeclaration& _declaration) |