Uast: consistency for imports-expressions

This commit is contained in:
Nicolay Mitropolsky
2018-01-18 21:39:20 +03:00
parent d5d49c65b4
commit 25cd54713b
3 changed files with 6 additions and 5 deletions
@@ -86,6 +86,10 @@ abstract class KotlinAbstractUElement(private val givenParent: UElement?) : UEle
parent = parent.parent
}
if (parent is KtImportList) {
parent = parent.parent
}
if (psi is KtSuperTypeCallEntry) {
parent = parent?.parent
}
@@ -321,7 +321,7 @@ internal object KotlinConverter {
?.toUElementOfType<UExpression>()
?: KotlinUFunctionCallExpression(element, givenParent)
}
is KtImportDirective -> el<UImportStatement>(build(::KotlinUImportStatement))
else -> {
if (element is LeafPsiElement && element.elementType == KtTokens.IDENTIFIER) {
el<UIdentifier>(build(::UIdentifier))
@@ -69,8 +69,5 @@ class SimpleKotlinRenderLogTest : AbstractKotlinRenderLogTest() {
fun testReceiverFun() = doTest("ReceiverFun")
@Test
fun testAnonymous() = doTest("Anonymous") { testName, file ->
//Disabled because cant convert IMPORT_DIRECTIVE
check(testName, file, false)
}
fun testAnonymous() = doTest("Anonymous")
}