Intentions: Fix contentRange() on empty KtBlockExpression

#KT-10776 Fixed
This commit is contained in:
Alexey Sedunov
2016-01-27 15:27:34 +03:00
parent c5b1d205a2
commit 1c65797950
4 changed files with 17 additions and 0 deletions
@@ -179,6 +179,7 @@ fun KtBlockExpression.contentRange(): PsiChildRange {
val last = rBrace!!
.siblings(forward = false, withItself = false)
.first { it !is PsiWhiteSpace }
if (last == lBrace) return PsiChildRange.EMPTY
return PsiChildRange(first, last)
}