Small cleanup

This commit is contained in:
Andrey Breslav
2011-09-09 20:15:28 +04:00
parent 9289b71e66
commit 0c48982cda
@@ -40,16 +40,13 @@ public class TypeHierarchyResolver {
declaration.accept(new JetVisitorVoid() { declaration.accept(new JetVisitorVoid() {
@Override @Override
public void visitNamespace(JetNamespace namespace) { public void visitNamespace(JetNamespace namespace) {
String name = JetPsiUtil.safeName(namespace.getName());
String name = namespace.getName();
if (name == null) {
name = "<no name provided>";
}
NamespaceDescriptorImpl namespaceDescriptor = owner.getNamespace(name); NamespaceDescriptorImpl namespaceDescriptor = owner.getNamespace(name);
if (namespaceDescriptor == null) { if (namespaceDescriptor == null) {
namespaceDescriptor = new NamespaceDescriptorImpl( namespaceDescriptor = new NamespaceDescriptorImpl(
owner.getOriginal(), owner.getOriginal(),
Collections.<AnnotationDescriptor>emptyList(), // TODO Collections.<AnnotationDescriptor>emptyList(), // TODO: annotations
name name
); );
namespaceDescriptor.initialize(new WritableScopeImpl(JetScope.EMPTY, namespaceDescriptor, context.getTrace().getErrorHandler()).setDebugName("Namespace member scope")); namespaceDescriptor.initialize(new WritableScopeImpl(JetScope.EMPTY, namespaceDescriptor, context.getTrace().getErrorHandler()).setDebugName("Namespace member scope"));