From 72b4b2b9bf01c918c44550317bb57e626510f25e Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Thu, 11 Jan 2018 20:12:00 +0300 Subject: [PATCH] 172: Revert "Uast: `AbstractKotlinUClass` compilation fix" This reverts commit 86ee036ae7d89f8acc885d54157d9b9ce5f2cb17. --- .../org/jetbrains/uast/kotlin/declarations/KotlinUClass.kt.172 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/declarations/KotlinUClass.kt.172 b/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/declarations/KotlinUClass.kt.172 index cc9a7addc4b..0e3315e29c7 100644 --- a/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/declarations/KotlinUClass.kt.172 +++ b/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/declarations/KotlinUClass.kt.172 @@ -35,7 +35,7 @@ abstract class AbstractKotlinUClass(private val givenParent: UElement?) : Abstra override val uastParent: UElement? by lz { givenParent ?: convertParent() } //TODO: should be merged with KotlinAbstractUElement.convertParent() after detaching from AbstractJavaUClass - override fun convertParent(): UElement? = + open fun convertParent(): UElement? = (this.psi as? KtLightClassForLocalDeclaration)?.kotlinOrigin?.parent?.let { when (it) { is KtClassBody -> it.parent.toUElement() // TODO: it seems that `class_body`-s are never created in kotlin uast in top-down walk, probably they should be completely skipped and always unwrapped