From 0e7d7ac7097390c65ff498fbc07756c9a162990d Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Fri, 30 Jan 2015 13:59:47 +0300 Subject: [PATCH] Workaround for type inference bug (KT-6694, for IDEA 140 branch) --- .../org/jetbrains/kotlin/psi/JetLabelReferenceExpression.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/psi/JetLabelReferenceExpression.kt b/compiler/frontend/src/org/jetbrains/kotlin/psi/JetLabelReferenceExpression.kt index b234a1cc27b..7e54ae1724c 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/psi/JetLabelReferenceExpression.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/psi/JetLabelReferenceExpression.kt @@ -18,7 +18,8 @@ package org.jetbrains.kotlin.psi import com.intellij.lang.ASTNode import org.jetbrains.kotlin.lexer.JetTokens +import com.intellij.psi.PsiElement public class JetLabelReferenceExpression(node: ASTNode) : JetSimpleNameExpressionImpl(node) { - public override fun getReferencedNameElement() = findChildByType(JetTokens.LABEL_IDENTIFIER) ?: this + public override fun getReferencedNameElement() = (findChildByType(JetTokens.LABEL_IDENTIFIER): PsiElement?) ?: this }