Remove unused 'trace' parameter in ModuleConfiguration
This commit is contained in:
committed by
Alexander Udalov
parent
54ee7456ce
commit
7e72494ddb
@@ -19,7 +19,6 @@ package org.jetbrains.jet.lang;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.BindingTrace;
|
||||
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
||||
import org.jetbrains.jet.lang.resolve.ImportPath;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.WritableScope;
|
||||
@@ -39,7 +38,7 @@ public class DefaultModuleConfiguration implements ModuleConfiguration {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void extendNamespaceScope(@NotNull BindingTrace trace, @NotNull NamespaceDescriptor namespaceDescriptor, @NotNull WritableScope namespaceMemberScope) {
|
||||
public void extendNamespaceScope(@NotNull NamespaceDescriptor namespaceDescriptor, @NotNull WritableScope namespaceMemberScope) {
|
||||
if (DescriptorUtils.getFQName(namespaceDescriptor).equalsTo(KotlinBuiltIns.getInstance().getBuiltInsPackageFqName())) {
|
||||
namespaceMemberScope.importScope(KotlinBuiltIns.getInstance().getBuiltInsScope());
|
||||
}
|
||||
|
||||
@@ -18,14 +18,12 @@ package org.jetbrains.jet.lang;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.BindingTrace;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.WritableScope;
|
||||
|
||||
public interface ModuleConfiguration {
|
||||
ModuleConfiguration EMPTY = new ModuleConfiguration() {
|
||||
|
||||
@Override
|
||||
public void extendNamespaceScope(@NotNull BindingTrace trace, @NotNull NamespaceDescriptor namespaceDescriptor, @NotNull WritableScope namespaceMemberScope) {
|
||||
public void extendNamespaceScope(@NotNull NamespaceDescriptor namespaceDescriptor, @NotNull WritableScope namespaceMemberScope) {
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,5 +36,5 @@ public interface ModuleConfiguration {
|
||||
* This method is called every time a namespace descriptor is created. Use it to add extra descriptors to the namespace, e.g. merge a
|
||||
* Java package with a Kotlin one
|
||||
*/
|
||||
void extendNamespaceScope(@NotNull BindingTrace trace, @NotNull NamespaceDescriptor namespaceDescriptor, @NotNull WritableScope namespaceMemberScope);
|
||||
void extendNamespaceScope(@NotNull NamespaceDescriptor namespaceDescriptor, @NotNull WritableScope namespaceMemberScope);
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ public class NamespaceFactoryImpl implements NamespaceFactory {
|
||||
namespaceDescriptor.initialize(scope);
|
||||
scope.changeLockLevel(WritableScope.LockLevel.BOTH);
|
||||
//
|
||||
moduleDescriptor.getModuleConfiguration().extendNamespaceScope(trace, namespaceDescriptor, scope);
|
||||
moduleDescriptor.getModuleConfiguration().extendNamespaceScope(namespaceDescriptor, scope);
|
||||
owner.addNamespace(namespaceDescriptor);
|
||||
if (expression != null) {
|
||||
trace.record(BindingContext.NAMESPACE, expression, namespaceDescriptor);
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ public class LazyPackageDescriptor extends AbstractNamespaceDescriptorImpl imple
|
||||
super(containingDeclaration, Collections.<AnnotationDescriptor>emptyList(), name);
|
||||
|
||||
WritableScopeImpl scope = new WritableScopeImpl(JetScope.EMPTY, this, RedeclarationHandler.DO_NOTHING, "Package scope");
|
||||
resolveSession.getRootModuleDescriptor().getModuleConfiguration().extendNamespaceScope(resolveSession.getTrace(), this, scope);
|
||||
resolveSession.getRootModuleDescriptor().getModuleConfiguration().extendNamespaceScope(this, scope);
|
||||
scope.changeLockLevel(WritableScope.LockLevel.READING);
|
||||
|
||||
this.lazyScope = new LazyPackageMemberScope(resolveSession, declarationProvider, this);
|
||||
|
||||
Reference in New Issue
Block a user