TextRange (@NotNull KtTryExpression expression) { KtParameter parameter = expression.getCatchClauses().get(0).getCatchParameter(); assert parameter != null : "Catch parameter should exists for " + expression.getText(); KtElement typeReference = parameter.getTypeReference(); assert typeReference != null : "Type reference for parameter should exists for " + expression.getText(); return typeReference.getTextRange(); }