Replaced if-check with assert.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user