From aa88e579a6dbba630cfde0b0047f5a221181406f Mon Sep 17 00:00:00 2001 From: Nicolay Mitropolsky Date: Mon, 28 Jan 2019 19:37:26 +0300 Subject: [PATCH] Uast: checking that element is valid before running into resolve probably will fix EA-134193 --- .../jetbrains/uast/kotlin/internal/kotlinInternalUastUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/internal/kotlinInternalUastUtils.kt b/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/internal/kotlinInternalUastUtils.kt index c56114458b3..2a2abaae31a 100644 --- a/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/internal/kotlinInternalUastUtils.kt +++ b/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/internal/kotlinInternalUastUtils.kt @@ -283,7 +283,7 @@ internal fun KtExpression.unwrapBlockOrParenthesis(): KtExpression { } internal fun KtElement.analyze(): BindingContext { - if (containingFile !is KtFile) return BindingContext.EMPTY // EA-114080, EA-113475 + if (!isValid || containingFile !is KtFile) return BindingContext.EMPTY // EA-114080, EA-113475, EA-134193 return ServiceManager.getService(project, KotlinUastResolveProviderService::class.java) ?.getBindingContext(this) ?: BindingContext.EMPTY }