From 3fda173ced7dc34bcc0669b2df33d3aab93624ea Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Mon, 16 Oct 2017 18:39:49 +0300 Subject: [PATCH] TypeDeclarationProvider should return null for irrelevant symbols Otherwise other providers won't be checked. --- .../kotlin/idea/codeInsight/KotlinTypeDeclarationProvider.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/codeInsight/KotlinTypeDeclarationProvider.kt b/idea/src/org/jetbrains/kotlin/idea/codeInsight/KotlinTypeDeclarationProvider.kt index fcc41f786f1..294a52a1d1b 100644 --- a/idea/src/org/jetbrains/kotlin/idea/codeInsight/KotlinTypeDeclarationProvider.kt +++ b/idea/src/org/jetbrains/kotlin/idea/codeInsight/KotlinTypeDeclarationProvider.kt @@ -26,7 +26,7 @@ import org.jetbrains.kotlin.types.KotlinType class KotlinTypeDeclarationProvider : TypeDeclarationProvider { override fun getSymbolTypeDeclarations(symbol: PsiElement): Array? { - 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