Wrap with safe let call handles qualified calls correctly #KT-13262 Fixed

(cherry picked from commit 7044348)
This commit is contained in:
Mikhail Glukhikh
2016-07-28 12:13:46 +03:00
committed by Mikhail Glukhikh
parent 77b7648f10
commit b7fd41844d
7 changed files with 47 additions and 4 deletions
@@ -365,5 +365,5 @@ fun <E : PsiElement> E.createSmartPointer(): SmartPsiElementPointer<E> =
fun PsiElement.before(element: PsiElement) = textRange.endOffset <= element.textRange.startOffset
inline fun <reified T : PsiElement> PsiElement.getLastParentOfTypeInRow() = parents.takeWhile { it is T }.lastOrNull()
inline fun <reified T : PsiElement> PsiElement.getLastParentOfTypeInRow() = parents.takeWhile { it is T }.lastOrNull() as? T