aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/ASTJsonConverter.cpp
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-07-05 00:34:24 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-07-13 02:33:51 +0800
commitfc370591f02d2bcfe52b62776a871b33e933bd34 (patch)
tree08101656cd0bef2da7a93fea9e3806e235a2acbd /libsolidity/ast/ASTJsonConverter.cpp
parent5d8a8f726555361a78dac05a5413558f3f63f7f1 (diff)
downloaddexon-solidity-fc370591f02d2bcfe52b62776a871b33e933bd34.tar.gz
dexon-solidity-fc370591f02d2bcfe52b62776a871b33e933bd34.tar.zst
dexon-solidity-fc370591f02d2bcfe52b62776a871b33e933bd34.zip
Disallow multi variable declarations with mismatching number of values.
Diffstat (limited to 'libsolidity/ast/ASTJsonConverter.cpp')
-rw-r--r--libsolidity/ast/ASTJsonConverter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp
index b7855668..a26828a6 100644
--- a/libsolidity/ast/ASTJsonConverter.cpp
+++ b/libsolidity/ast/ASTJsonConverter.cpp
@@ -555,8 +555,8 @@ bool ASTJsonConverter::visit(EmitStatement const& _node)
bool ASTJsonConverter::visit(VariableDeclarationStatement const& _node)
{
Json::Value varDecs(Json::arrayValue);
- for (auto const& v: _node.annotation().assignments)
- appendMove(varDecs, idOrNull(v));
+ for (auto const& v: _node.declarations())
+ appendMove(varDecs, idOrNull(v.get()));
setJsonNode(_node, "VariableDeclarationStatement", {
make_pair("assignments", std::move(varDecs)),
make_pair("declarations", toJson(_node.declarations())),