Workaround for type inference bug (KT-6694, for IDEA 140 branch)

This commit is contained in:
Evgeny Gerashchenko
2015-01-30 13:59:47 +03:00
parent 6511086034
commit 0e7d7ac709
@@ -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
}