TypeDeclarationProvider should return null for irrelevant symbols

Otherwise other providers won't be checked.
This commit is contained in:
Nikolay Krasko
2017-10-16 18:39:49 +03:00
parent 9fe0681fb6
commit 3fda173ced
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.types.KotlinType
class KotlinTypeDeclarationProvider : TypeDeclarationProvider {
override fun getSymbolTypeDeclarations(symbol: PsiElement): Array<PsiElement>? {
if (symbol.containingFile !is KtFile) return emptyArray()
if (symbol.containingFile !is KtFile) return null
if (symbol is PsiWhiteSpace) {
// Navigate to type of first parameter in lambda, works with the help of KotlinTargetElementEvaluator for the 'it' case