Uast: AbstractKotlinUClass compilation fix

This commit is contained in:
Nicolay Mitropolsky
2017-11-30 22:05:20 +03:00
committed by Nikolay Krasko
parent b51a7c6957
commit 5f6e5c5779
@@ -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
open fun convertParent(): UElement? =
override 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