Ensure that UElement.nameIdentifier.containingFile is a real file

This is needed to report inspection problems on UAST elements.
This commit is contained in:
Dmitry Jemerov
2017-04-19 19:06:18 +02:00
parent d001cea4c3
commit 49a211b3cd
7 changed files with 81 additions and 1 deletions
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.psi.KtPrimaryConstructor
import org.jetbrains.kotlin.psi.KtSecondaryConstructor
import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject
class KtLightIdentifier(
open class KtLightIdentifier(
private val lightOwner: PsiNameIdentifierOwner,
private val ktDeclaration: KtNamedDeclaration?
) : LightIdentifier(lightOwner.manager, ktDeclaration?.name ?: ""), PsiCompiledElement {