JetPositionManager: restrict scope of type mapper

This commit is contained in:
Pavel V. Talanov
2014-10-20 19:31:08 +04:00
parent f2018a8764
commit 5806a66cf9
@@ -319,7 +319,8 @@ public class JetPositionManager implements PositionManager {
@Override
public Result<JetTypeMapper> compute() {
Project project = file.getProject();
Collection<JetFile> packageFiles = findFilesWithExactPackage(fqName, GlobalSearchScope.allScope(project), project);
GlobalSearchScope packageFacadeScope = ResolvePackage.getModuleInfo(file).contentScope();
Collection<JetFile> packageFiles = findFilesWithExactPackage(fqName, packageFacadeScope, project);
AnalyzeExhaust analyzeExhaust = ResolvePackage.getAnalysisResultsForElements(packageFiles);
analyzeExhaust.throwIfError();