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