UAST: property delegates consistency #KT-22527 Fixed

This commit is contained in:
Mikhail Glukhikh
2018-04-19 14:23:33 +03:00
parent f179b2ba13
commit a25e971d19
2 changed files with 5 additions and 1 deletions
@@ -103,6 +103,10 @@ abstract class KotlinAbstractUElement(private val givenParent: UElement?) : Kotl
parent = parent?.parent
}
if (parent is KtPropertyDelegate) {
parent = parent.parent
}
val result = doConvertParent(this, parent)
if (result == this) {
throw IllegalStateException("Loop in parent structure when converting a $psi of type ${psi?.javaClass} with parent $parent of type ${parent?.javaClass} text: [${parent?.text}]")
@@ -29,7 +29,7 @@ class SimpleKotlinRenderLogTest : AbstractKotlinRenderLogTest() {
@Test fun testQualifiedConstructorCall() = doTest("QualifiedConstructorCall")
@Test fun testPropertyDelegate() = doTest("PropertyDelegate") { testName, file -> check(testName, file, false) }
@Test fun testPropertyDelegate() = doTest("PropertyDelegate")
@Test fun testLocalVariableWithAnnotation() = doTest("LocalVariableWithAnnotation")