forked from qt-creator/qt-creator
QmlJS: Enhance member lookup
Check for the alias when performing a member lookup on an import. Fixes: QTCREATORBUG-26714 Change-Id: If3febb7d6de9fa2663cdda0143d4aa3590312ca5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -2378,10 +2378,14 @@ const Value *TypeScope::lookupMember(const QString &name, const Context *context
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (const Value *v = import->lookupMember(name, context, foundInObject)) {
|
if (const Value *v = import->lookupMember(name, context, foundInObject)) {
|
||||||
|
// FIXME if we have multiple non-aliased imports containing this object we'd have to
|
||||||
|
// disambiguate (and inform the user) about this issue
|
||||||
|
if (info.as().isEmpty()) {
|
||||||
i.used = true;
|
i.used = true;
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (foundInObject)
|
if (foundInObject)
|
||||||
*foundInObject = nullptr;
|
*foundInObject = nullptr;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user