qmljs: do not look up types in the prototypes

looking up types in prototypes leads to a recursive blowup when resolving
the prototype of a type returns (for incorrect code) the type itself.

Change-Id: Iebcbdda7554e5fe01f0ef323ccc2079888c7ef4e
Task-number: QTCREATORBUG-13906
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Fawzi Mohamed
2015-02-05 17:26:30 +01:00
parent b3f049aa7d
commit 6a120df7f7

View File

@@ -116,7 +116,7 @@ const ObjectValue *Context::lookupType(const QmlJS::Document *doc, UiQualifiedId
for (UiQualifiedId *iter = qmlTypeName; objectValue && iter && iter != qmlTypeNameEnd; for (UiQualifiedId *iter = qmlTypeName; objectValue && iter && iter != qmlTypeNameEnd;
iter = iter->next) { iter = iter->next) {
const Value *value = objectValue->lookupMember(iter->name.toString(), this); const Value *value = objectValue->lookupMember(iter->name.toString(), this, 0, false);
if (!value) if (!value)
return 0; return 0;