use of org.jetbrains.kotlin.psi.KtFinallySection in project kotlin by JetBrains.
the class KotlinTryFinallySurrounder method getTextRangeForCaret.
@NotNull
@Override
protected TextRange getTextRangeForCaret(@NotNull KtTryExpression expression) {
KtFinallySection block = expression.getFinallyBlock();
assert block != null : "Finally block should exists for " + expression.getText();
KtExpression blockExpression = block.getFinalExpression().getStatements().get(0);
return blockExpression.getTextRange();
}
Aggregations