From 375dd05773829fd1d01bf4b00da4c1acde92dffc Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Mon, 4 Feb 2013 18:57:27 +0400 Subject: [PATCH] Replaced if-check with assert. --- .../jet/plugin/intentions/SpecifyTypeExplicitlyAction.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/idea/src/org/jetbrains/jet/plugin/intentions/SpecifyTypeExplicitlyAction.java b/idea/src/org/jetbrains/jet/plugin/intentions/SpecifyTypeExplicitlyAction.java index 3f3ca864871..9678f485031 100644 --- a/idea/src/org/jetbrains/jet/plugin/intentions/SpecifyTypeExplicitlyAction.java +++ b/idea/src/org/jetbrains/jet/plugin/intentions/SpecifyTypeExplicitlyAction.java @@ -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) {