Omport order fixed: the current package must have the highest priority
This commit is contained in:
@@ -67,11 +67,9 @@ public class ScopeProvider {
|
|||||||
throw new IllegalStateException("Root package not found");
|
throw new IllegalStateException("Root package not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
writableScope.importScope(rootPackageDescriptor.getMemberScope());
|
|
||||||
|
|
||||||
// Don't import twice
|
// Don't import twice
|
||||||
if (!packageDescriptor.getQualifiedName().equals(FqName.ROOT)) {
|
if (!packageDescriptor.getQualifiedName().equals(FqName.ROOT)) {
|
||||||
writableScope.importScope(packageDescriptor.getMemberScope());
|
writableScope.importScope(rootPackageDescriptor.getMemberScope());
|
||||||
}
|
}
|
||||||
|
|
||||||
List<JetImportDirective> importDirectives = Lists.newArrayList(file.getImportDirectives());
|
List<JetImportDirective> importDirectives = Lists.newArrayList(file.getImportDirectives());
|
||||||
@@ -81,6 +79,8 @@ public class ScopeProvider {
|
|||||||
resolveSession.getModuleConfiguration(), resolveSession.getTrace(),
|
resolveSession.getModuleConfiguration(), resolveSession.getTrace(),
|
||||||
resolveSession.getInjector().getQualifiedExpressionResolver());
|
resolveSession.getInjector().getQualifiedExpressionResolver());
|
||||||
|
|
||||||
|
writableScope.importScope(packageDescriptor.getMemberScope());
|
||||||
|
|
||||||
writableScope.changeLockLevel(WritableScope.LockLevel.READING);
|
writableScope.changeLockLevel(WritableScope.LockLevel.READING);
|
||||||
// TODO: Cache
|
// TODO: Cache
|
||||||
return writableScope;
|
return writableScope;
|
||||||
|
|||||||
Reference in New Issue
Block a user