Commit 87992d0d authored by yann300's avatar yann300

fix tests

parent 83ded7df
...@@ -224,7 +224,7 @@ async function buildTree (tree, step, scopeId, isExternalCall, isCreation) { ...@@ -224,7 +224,7 @@ async function buildTree (tree, step, scopeId, isExternalCall, isCreation) {
// if not, we are in the current scope. // if not, we are in the current scope.
// We check in `includeVariableDeclaration` if there is a new local variable in scope for this specific `step` // We check in `includeVariableDeclaration` if there is a new local variable in scope for this specific `step`
if (tree.includeLocalVariables) { if (tree.includeLocalVariables) {
includeVariableDeclaration(tree, step, sourceLocation, scopeId, newLocation, previousSourceLocation) await includeVariableDeclaration(tree, step, sourceLocation, scopeId, newLocation, previousSourceLocation)
} }
previousSourceLocation = sourceLocation previousSourceLocation = sourceLocation
step++ step++
...@@ -357,7 +357,7 @@ function extractVariableDeclarations (ast, astWalker) { ...@@ -357,7 +357,7 @@ function extractVariableDeclarations (ast, astWalker) {
if (node.nodeType === 'VariableDeclaration' || node.nodeType === 'YulVariableDeclaration') { if (node.nodeType === 'VariableDeclaration' || node.nodeType === 'YulVariableDeclaration') {
ret[node.src] = [node] ret[node.src] = [node]
} }
if (node.nodeType === 'VariableDeclarationStatement' || node.nodeType === 'YulVariableDeclarationStatement') { if (node.initialValue && (node.nodeType === 'VariableDeclarationStatement' || node.nodeType === 'YulVariableDeclarationStatement')) {
ret[node.initialValue.src] = node.declarations ret[node.initialValue.src] = node.declarations
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment