Replaced if-check with assert.

This commit is contained in:
Evgeny Gerashchenko
2013-02-04 18:57:27 +04:00
parent b541b14ee9
commit 375dd05773
@@ -57,9 +57,7 @@ public class SpecifyTypeExplicitlyAction extends PsiElementBaseIntentionAction {
}
PsiElement parent = element.getParent();
JetType type = getTypeForDeclaration((JetNamedDeclaration) parent);
if (ErrorUtils.isErrorType(type)) {
return;
}
assert !ErrorUtils.isErrorType(type) : "Unexpected error type: " + element.getText();
if (parent instanceof JetProperty) {
JetProperty property = (JetProperty) parent;
if (property.getTypeRef() == null) {