aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/NameAndTypeResolver.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-10-09 00:01:12 +0800
committerchriseth <c@ethdev.com>2015-10-09 00:25:44 +0800
commitb9a166061bc94cd06458c945d66bf52e76e84b70 (patch)
tree9e317a5de58a050f49187a0318fff0e4981d7c98 /libsolidity/NameAndTypeResolver.cpp
parent23865e39295dd9199769727b037c1d126807b20e (diff)
downloaddexon-solidity-b9a166061bc94cd06458c945d66bf52e76e84b70.tar.gz
dexon-solidity-b9a166061bc94cd06458c945d66bf52e76e84b70.tar.zst
dexon-solidity-b9a166061bc94cd06458c945d66bf52e76e84b70.zip
Refactoring to allow multi-variable declarations.
Diffstat (limited to 'libsolidity/NameAndTypeResolver.cpp')
-rw-r--r--libsolidity/NameAndTypeResolver.cpp4
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)