Replaced if-check with assert.
This commit is contained in:
@@ -57,9 +57,7 @@ public class SpecifyTypeExplicitlyAction extends PsiElementBaseIntentionAction {
|
|||||||
}
|
}
|
||||||
PsiElement parent = element.getParent();
|
PsiElement parent = element.getParent();
|
||||||
JetType type = getTypeForDeclaration((JetNamedDeclaration) parent);
|
JetType type = getTypeForDeclaration((JetNamedDeclaration) parent);
|
||||||
if (ErrorUtils.isErrorType(type)) {
|
assert !ErrorUtils.isErrorType(type) : "Unexpected error type: " + element.getText();
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (parent instanceof JetProperty) {
|
if (parent instanceof JetProperty) {
|
||||||
JetProperty property = (JetProperty) parent;
|
JetProperty property = (JetProperty) parent;
|
||||||
if (property.getTypeRef() == null) {
|
if (property.getTypeRef() == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user