Fixed #1692 Resolving use namespace

This commit is contained in:
Jindra Petřík
2022-11-17 13:44:52 +01:00
parent 202e66ea1d
commit 25cebd9e6b
2 changed files with 6 additions and 0 deletions

View File

@@ -433,8 +433,12 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item {
}
}
DottedChain classChain = DottedChain.parseWithSuffix(currentClass);
DottedChain pkg = classChain.getWithoutLast();
//Search for types in opened namespaces
for (NamespaceItem n : openedNamespaces) {
n.resolveCustomNs(abcIndex, importedClasses, pkg, openedNamespaces, localData);
Namespace ons = abc.getSelectedAbc().constants.getNamespace(n.getCpoolIndex(abc));
TypeItem ti = new TypeItem(ons.getName(abc.getSelectedAbc().constants).addWithSuffix(name.get(0)));
AbcIndexing.ClassIndex ci = abc.findClass(ti);