Drop path() from FQ names, remove weird code from FqNameUnsafe

This commit is contained in:
Alexander Udalov
2015-10-20 21:45:08 +03:00
parent 8a89662ea5
commit 05f9f5a661
4 changed files with 17 additions and 133 deletions
@@ -208,8 +208,10 @@ public final class StaticContext {
JsNameRef result = null;
JsNameRef qualifier = null;
for (FqName pathElement : ContainerUtil.reverse(packageFqName.path())) {
JsNameRef ref = getNameForPackage(pathElement).makeRef();
FqName fqName = packageFqName;
while (true) {
JsNameRef ref = getNameForPackage(fqName).makeRef();
if (qualifier == null) {
result = ref;
@@ -219,9 +221,11 @@ public final class StaticContext {
}
qualifier = ref;
if (fqName.isRoot()) break;
fqName = fqName.parent();
}
assert result != null : "didn't iterate: " + packageFqName;
return result;
}