diff --git a/idea/src/jet/Library.jet b/idea/src/jet/Library.jet index 15b5d8f73a4..28e0610879e 100644 --- a/idea/src/jet/Library.jet +++ b/idea/src/jet/Library.jet @@ -7,8 +7,8 @@ namespace typeinfo { } } -fun Any?.equals(other : Any?) : Boolean = this === other - +// Can't write a body due to a bootstrapping problem (see JET-74) +fun Any?.equals(other : Any?) : Boolean// = this === other class Iterator { fun next() : T diff --git a/idea/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java b/idea/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java index 7184e507ee6..26f61448593 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java @@ -77,6 +77,12 @@ public class TopDownAnalyzer { }; } + @Deprecated // For JetStandardLibraryOnly + public void processStandardLibraryNamespace(@NotNull WritableScope outerScope, @NotNull NamespaceDescriptorImpl standardLibraryNamespace, @NotNull JetNamespace namespace) { + namespaceScopes.put(namespace, standardLibraryNamespace.getMemberScope()); + namespaceDescriptors.put(namespace, standardLibraryNamespace); + process(outerScope, standardLibraryNamespace, namespace.getDeclarations()); + } public void process(@NotNull WritableScope outerScope, NamespaceLike owner, @NotNull List declarations) { collectNamespacesAndClassifiers(outerScope, owner, declarations); // namespaceScopes, classes diff --git a/idea/src/org/jetbrains/jet/lang/types/JetStandardLibrary.java b/idea/src/org/jetbrains/jet/lang/types/JetStandardLibrary.java index af915d769bb..8f390d1a342 100644 --- a/idea/src/org/jetbrains/jet/lang/types/JetStandardLibrary.java +++ b/idea/src/org/jetbrains/jet/lang/types/JetStandardLibrary.java @@ -75,7 +75,8 @@ public class JetStandardLibrary { TopDownAnalyzer bootstrappingTDA = new TopDownAnalyzer(bootstrappingSemanticServices, bindingTraceContext); WritableScopeImpl writableScope = new WritableScopeImpl(JetStandardClasses.STANDARD_CLASSES, JetStandardClasses.STANDARD_CLASSES_NAMESPACE, ErrorHandler.THROW_EXCEPTION); // this.libraryScope = bootstrappingTDA.process(JetStandardClasses.STANDARD_CLASSES, file.getRootNamespace().getDeclarations()); - bootstrappingTDA.process(writableScope, JetStandardClasses.STANDARD_CLASSES_NAMESPACE, file.getRootNamespace().getDeclarations()); +// bootstrappingTDA.process(writableScope, JetStandardClasses.STANDARD_CLASSES_NAMESPACE, file.getRootNamespace().getDeclarations()); + bootstrappingTDA.processStandardLibraryNamespace(writableScope, JetStandardClasses.STANDARD_CLASSES_NAMESPACE, file.getRootNamespace()); this.libraryScope = JetStandardClasses.STANDARD_CLASSES_NAMESPACE.getMemberScope(); AnalyzingUtils.applyHandler(ErrorHandler.THROW_EXCEPTION, bindingTraceContext);