Skip to content

'infer function return type' refactoring always shown #42993

Closed
@mjbvz

Description

@mjbvz

Bug Report

🔎 Search Terms

  • refactoring
  • quick fix
  • code action

🕗 Version & Regression Information

4.2.2

💻 Code

function foo() {
    return 1;
}
  1. In VS Code, place cursor anywhere inside of foo

🙁 Actual behavior

The lightbulb always shows up. This is because the infer function return type quick fix is always being returned

🙂 Expected behavior

This quick fix should likely only show when refactoring are explicitly requested or if the cursor is at a specific spot in the code (such as the function signature)

/cc @jessetrinity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions