diff options
Diffstat (limited to 'src/qml/parser/qqmljsast.cpp')
-rw-r--r-- | src/qml/parser/qqmljsast.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/parser/qqmljsast.cpp b/src/qml/parser/qqmljsast.cpp index 9484b53a39..4ebb2d3b5c 100644 --- a/src/qml/parser/qqmljsast.cpp +++ b/src/qml/parser/qqmljsast.cpp @@ -465,6 +465,8 @@ bool PatternProperty::convertLiteralToAssignmentPattern(MemoryPool *pool, Source *errorMessage = QString::fromLatin1("Invalid getter/setter in destructuring expression."); return false; } + if (type == Method) + type = Literal; Q_ASSERT(type == Literal); return PatternElement::convertLiteralToAssignmentPattern(pool, errorLocation, errorMessage); } |