Uast: consistency for imports-expressions
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user