diff options
-rw-r--r-- | src/qml/parser/qqmljs.g | 2 | ||||
-rw-r--r-- | src/qml/parser/qqmljsast.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/parser/qqmljs.g b/src/qml/parser/qqmljs.g index da8616362b..4acddc78b6 100644 --- a/src/qml/parser/qqmljs.g +++ b/src/qml/parser/qqmljs.g @@ -2491,7 +2491,7 @@ AssignmentExpression: LeftHandSideExpression T_EQ AssignmentExpression; AssignmentExpression_In: LeftHandSideExpression T_EQ AssignmentExpression_In; /. case $rule_number: { - // need to convert the LHS to an AssignmentPatthern if it was an Array/ObjectLiteral + // need to convert the LHS to an AssignmentPattern if it was an Array/ObjectLiteral if (AST::Pattern *p = sym(1).Expression->patternCast()) { AST::SourceLocation errorLoc; QString errorMsg; diff --git a/src/qml/parser/qqmljsast.cpp b/src/qml/parser/qqmljsast.cpp index 114aa4a830..6c0e394a34 100644 --- a/src/qml/parser/qqmljsast.cpp +++ b/src/qml/parser/qqmljsast.cpp @@ -431,6 +431,7 @@ bool PatternElement::convertLiteralToAssignmentPattern(MemoryPool *pool, SourceL } if (auto *i = cast<IdentifierExpression *>(lhs)) { bindingIdentifier = i->name.toString(); + identifierToken = i->identifierToken; return true; } *errorLocation = lastSourceLocation(); |