message: Don't show refactoring if it can't be made
diff: +import * as t from "../../ast";
  import { Editor, ErrorReason } from "../../editor/editor";
  import { Selection } from "../../editor/selection";
  -import * as t from "../../ast";
  export async function convertToArrowFunction(editor: Editor) {
  const { code, selection } = editor;
  @@ -9,11 +9,6 @@ export async function convertToArrowFunction(editor: Editor) {
  selection
  );
  - if (!updatedCode.hasCodeChanged) {
  - editor.showError(ErrorReason.DidNotFindFunctionDeclarationToConvert);
  - return;
  - }
  -
  if (hasReferenceBefore) {
  editor.showError(
  ErrorReason.CantConvertFunctionDeclarationBecauseUsedBefore
  @@ -21,6 +16,11 @@ export async function convertToArrowFunction(editor: Editor) {
  return;
  }
  + if (!updatedCode.hasCodeChanged) {
  + editor.showError(ErrorReason.DidNotFindFunctionDeclarationToConvert);
  + return;
  + }
  +
  await editor.write(updatedCode.code);
  }
  @@ -41,7 +41,12 @@ function updateCode(
  );
  }
  - hasReferenceBefore = converter.hasReferenceBefore;
  + if (converter.hasReferenceBefore) {
  + hasReferenceBefore = true;
  + path.stop();
  + return;
  + }
  +
  path.replaceWith(converter.replacementNode);
  path.stop();
  })
  