diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/RemovePartsFromPropertyFix.java b/idea/src/org/jetbrains/kotlin/idea/quickfix/RemovePartsFromPropertyFix.java index ad3b23416a7..fd531277e9e 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/RemovePartsFromPropertyFix.java +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/RemovePartsFromPropertyFix.java @@ -85,8 +85,10 @@ public class RemovePartsFromPropertyFix extends KotlinQuickFixAction @Override public boolean isAvailable(@NotNull Project project, Editor editor, @NotNull PsiFile file) { + if (!super.isAvailable(project, editor, file)) return false; + KotlinType type = QuickFixUtil.getDeclarationReturnType(getElement()); - return super.isAvailable(project, editor, file) && type != null && !type.isError(); + return type != null && !type.isError(); } @Override