提交 eeafd06c 编写于 作者: E Evgeny Gerashchenko

Got rid of returning empty range list in position strategies (in places where...

Got rid of returning empty range list in position strategies (in places where they depend on syntax errors).
上级 abdf3441
......@@ -288,7 +288,6 @@ public interface Errors {
@NotNull
@Override
public List<TextRange> mark(@NotNull JetWhenExpression element) {
if (hasSyntaxError(element)) return Collections.emptyList();
return markElement(element.getWhenKeywordElement());
}
});
......
......@@ -74,14 +74,11 @@ public class PositioningStrategies {
@NotNull
@Override
public List<TextRange> mark(@NotNull PsiNameIdentifierOwner element) {
if (element.getLastChild() instanceof PsiErrorElement) {
return Collections.emptyList();
}
PsiElement nameIdentifier = element.getNameIdentifier();
if (nameIdentifier != null) {
return markElement(nameIdentifier);
}
return Collections.emptyList();
return markElement(element);
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册