From 86551ddd6ee331fb2173f25ba7022442a84c3d97 Mon Sep 17 00:00:00 2001 From: Nicolay Mitropolsky Date: Tue, 12 Nov 2019 18:57:08 +0300 Subject: [PATCH] Uast: `UastContext.toUElementOfType` made not work via `UastFacade` to avoid expose binary-incompatible calls via inline functions https://intellij-support.jetbrains.com/hc/en-us/community/posts/360006498920-Backward-compatibility-problem-with-UAST?flash_digest=0ad4e5410416c6c8e21a1aa660b0fb0d02d5611e GitOrigin-RevId: 32d47843f0c8825c24bce537ba088eb5da8d8deb --- uast/uast-common/src/org/jetbrains/uast/UastContext.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/uast/uast-common/src/org/jetbrains/uast/UastContext.kt b/uast/uast-common/src/org/jetbrains/uast/UastContext.kt index 13995ee2fbff..bbb682cf4c77 100644 --- a/uast/uast-common/src/org/jetbrains/uast/UastContext.kt +++ b/uast/uast-common/src/org/jetbrains/uast/UastContext.kt @@ -133,8 +133,7 @@ fun PsiElement?.toUElementOfExpectedTypes(vararg clss: Class PsiElement?.toUElementOfType(): T? = - this?.let { UastFacade.convertElementWithParent(this, T::class.java) as T? } +inline fun PsiElement?.toUElementOfType(): T? = toUElement(T::class.java) /** * Finds an UAST element of a given type at the given [offset] in the specified file. Returns null if there is no UAST