aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qv4compilerscanfunctions.cpp8
-rw-r--r--src/qml/compiler/qv4compilerscanfunctions_p.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compilerscanfunctions.cpp b/src/qml/compiler/qv4compilerscanfunctions.cpp
index fc3ac769ae..e0eaa8867b 100644
--- a/src/qml/compiler/qv4compilerscanfunctions.cpp
+++ b/src/qml/compiler/qv4compilerscanfunctions.cpp
@@ -481,6 +481,14 @@ bool ScanFunctions::visit(FieldMemberExpression *ast)
return true;
}
+bool ScanFunctions::visit(ArrayPattern *ast)
+{
+ for (PatternElementList *it = ast->elements; it; it = it->next)
+ Node::accept(it->element, this);
+
+ return false;
+}
+
bool ScanFunctions::enterFunction(FunctionExpression *ast, bool enterName)
{
if (_context->isStrict && (ast->name == QLatin1String("eval") || ast->name == QLatin1String("arguments")))
diff --git a/src/qml/compiler/qv4compilerscanfunctions_p.h b/src/qml/compiler/qv4compilerscanfunctions_p.h
index 4463a4f4f3..28ad846bcd 100644
--- a/src/qml/compiler/qv4compilerscanfunctions_p.h
+++ b/src/qml/compiler/qv4compilerscanfunctions_p.h
@@ -120,6 +120,7 @@ protected:
bool visit(AST::TemplateLiteral *ast) override;
bool visit(AST::SuperLiteral *) override;
bool visit(AST::FieldMemberExpression *) override;
+ bool visit(AST::ArrayPattern *) override;
bool enterFunction(AST::FunctionExpression *ast, bool enterName);