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:
Christian Stenger
2022-06-15 14:57:51 +02:00
parent e980d87b50
commit fd5bcea5f6

View File

@@ -2378,8 +2378,12 @@ const Value *TypeScope::lookupMember(const QString &name, const Context *context
continue;
if (const Value *v = import->lookupMember(name, context, foundInObject)) {
i.used = true;
return v;
// 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;
return v;
}
}
}
if (foundInObject)