Standard library is imported properly rather than enclosing the user code
This commit is contained in:
@@ -68,8 +68,10 @@ public class AnalyzingUtils {
|
|||||||
|
|
||||||
JetScope libraryScope = semanticServices.getStandardLibrary().getLibraryScope();
|
JetScope libraryScope = semanticServices.getStandardLibrary().getLibraryScope();
|
||||||
ModuleDescriptor owner = new ModuleDescriptor("<module>");
|
ModuleDescriptor owner = new ModuleDescriptor("<module>");
|
||||||
final WritableScope scope = new WritableScopeImpl(libraryScope, owner, new TraceBasedRedeclarationHandler(bindingTraceContext)).setDebugName("Root scope in analyzeNamespace");
|
// final WritableScope scope = new WritableScopeImpl(libraryScope, owner, new TraceBasedRedeclarationHandler(bindingTraceContext)).setDebugName("Root scope in analyzeNamespace");
|
||||||
|
final WritableScope scope = new WritableScopeImpl(JetScope.EMPTY, owner, new TraceBasedRedeclarationHandler(bindingTraceContext)).setDebugName("Root scope in analyzeNamespace");
|
||||||
importingStrategy.addImports(project, semanticServices, bindingTraceContext, scope);
|
importingStrategy.addImports(project, semanticServices, bindingTraceContext, scope);
|
||||||
|
scope.importScope(libraryScope);
|
||||||
TopDownAnalyzer.process(semanticServices, bindingTraceContext, scope, new NamespaceLike.Adapter(owner) {
|
TopDownAnalyzer.process(semanticServices, bindingTraceContext, scope, new NamespaceLike.Adapter(owner) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import org.jetbrains.jet.lang.psi.JetFile;
|
|||||||
import org.jetbrains.jet.lang.psi.JetReferenceExpression;
|
import org.jetbrains.jet.lang.psi.JetReferenceExpression;
|
||||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||||
import org.jetbrains.jet.lang.resolve.BindingContextUtils;
|
import org.jetbrains.jet.lang.resolve.BindingContextUtils;
|
||||||
import org.jetbrains.jet.lang.resolve.java.AnalyzerFacade;
|
|
||||||
import org.jetbrains.jet.plugin.compiler.WholeProjectAnalyzerFacade;
|
import org.jetbrains.jet.plugin.compiler.WholeProjectAnalyzerFacade;
|
||||||
import org.jetbrains.jet.resolve.DescriptorRenderer;
|
import org.jetbrains.jet.resolve.DescriptorRenderer;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user