Limit resolve scope when completing in module sources

This commit is contained in:
Pavel V. Talanov
2016-04-07 19:18:55 +03:00
parent 4ec4d6ec66
commit 08ef1749b6
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@ fun getResolveScope(file: KtFile): GlobalSearchScope {
}
return when (file.getModuleInfo()) {
is ModuleSourceInfo -> file.resolveScope
is ModuleSourceInfo -> KotlinSourceFilterScope.sourceAndClassFiles(file.resolveScope, file.project)
else -> GlobalSearchScope.EMPTY_SCOPE
}
}