diff options
Diffstat (limited to 'src/qml/parser/qqmljsast.cpp')
-rw-r--r-- | src/qml/parser/qqmljsast.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/parser/qqmljsast.cpp b/src/qml/parser/qqmljsast.cpp index 814262d98b..b63feb3362 100644 --- a/src/qml/parser/qqmljsast.cpp +++ b/src/qml/parser/qqmljsast.cpp @@ -259,10 +259,8 @@ void RegExpLiteral::accept0(Visitor *visitor) void ArrayPattern::accept0(Visitor *visitor) { - if (visitor->visit(this)) { + if (visitor->visit(this)) accept(elements, visitor); - accept(elision, visitor); - } visitor->endVisit(this); } @@ -358,6 +356,8 @@ bool ArrayPattern::convertLiteralToAssignmentPattern(MemoryPool *pool, SourceLoc if (parseMode == Binding) return true; for (auto *it = elements; it; it = it->next) { + if (!it->element) + continue; if (it->element->type == PatternElement::SpreadElement && it->next) { *errorLocation = it->element->firstSourceLocation(); *errorMessage = QString::fromLatin1("'...' can only appear as last element in a destructuring list."); |