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
This commit is contained in:
Nicolay Mitropolsky
2019-11-12 18:11:52 +00:00
committed by intellij-monorepo-bot
parent 3c78abeae5
commit 86551ddd6e
@@ -133,8 +133,7 @@ fun <T : UElement> PsiElement?.toUElementOfExpectedTypes(vararg clss: Class<out
}
inline fun <reified T : UElement> PsiElement?.toUElementOfType(): T? =
this?.let { UastFacade.convertElementWithParent(this, T::class.java) as T? }
inline fun <reified T : UElement> 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