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");
|
||||
}
|
||||
|
||||
writableScope.importScope(rootPackageDescriptor.getMemberScope());
|
||||
|
||||
// Don't import twice
|
||||
if (!packageDescriptor.getQualifiedName().equals(FqName.ROOT)) {
|
||||
writableScope.importScope(packageDescriptor.getMemberScope());
|
||||
writableScope.importScope(rootPackageDescriptor.getMemberScope());
|
||||
}
|
||||
|
||||
List<JetImportDirective> importDirectives = Lists.newArrayList(file.getImportDirectives());
|
||||
@@ -81,6 +79,8 @@ public class ScopeProvider {
|
||||
resolveSession.getModuleConfiguration(), resolveSession.getTrace(),
|
||||
resolveSession.getInjector().getQualifiedExpressionResolver());
|
||||
|
||||
writableScope.importScope(packageDescriptor.getMemberScope());
|
||||
|
||||
writableScope.changeLockLevel(WritableScope.LockLevel.READING);
|
||||
// TODO: Cache
|
||||
return writableScope;
|
||||
|
||||
Reference in New Issue
Block a user