diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index 1ae028c81525c01f19c1a216196d21ad7ab45c0f..e128148d15cb318a099786a4a43b50ba2ed599e0 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -86,8 +86,17 @@ bool Check::visit(UiObjectBinding *ast) void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId, UiObjectInitializer *initializer) { + // If the 'typeId' starts with a lower-case letter, it doesn't define + // a new object instance. For instance: anchors { ... } + if (typeId->name->asString().at(0).isLower() && ! typeId->next) { + checkScopeObjectMember(typeId); + // ### don't give up! + return; + } + if (! _context.lookupType(_doc.data(), typeId)) { warning(typeId->identifierToken, QLatin1String("unknown type")); + // ### don't give up! return; }