diff options
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/compiler/qqmlpropertyvalidator.cpp | 6 | ||||
-rw-r--r-- | src/qml/compiler/qv4compilerscanfunctions.cpp | 8 | ||||
-rw-r--r-- | src/qml/compiler/qv4compilerscanfunctions_p.h | 1 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmlpropertyvalidator.cpp b/src/qml/compiler/qqmlpropertyvalidator.cpp index 746f68369f..b1865121d3 100644 --- a/src/qml/compiler/qqmlpropertyvalidator.cpp +++ b/src/qml/compiler/qqmlpropertyvalidator.cpp @@ -276,7 +276,11 @@ QVector<QQmlCompileError> QQmlPropertyValidator::validateObject(int objectIndex, } } else { if (!enginePrivate->propertyCacheForType(pd->propType())) { - return recordError(binding->location, tr("Invalid grouped property access")); + return recordError(binding->location, + tr("Invalid grouped property access: Property \"%1\" with type \"%2\", which is not a value type") + .arg(name) + .arg(QString::fromLatin1(QMetaType::typeName(pd->propType()))) + ); } } } 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); |