Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inferred type annotation for top-level definitions is unavailable in vscode when diagnostics are only updated on save #607

Open
odf opened this issue Jun 12, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@odf
Copy link

odf commented Jun 12, 2021

Expected Behavior

When selecting a definition and bringing up the associated quick-fix menu via Ctrl-. or clicking on the light bulb symbol that appears next to it, "Add inferred annotation" should be among the options.

Current Behavior

If the "Only Update Diagnostics On Save" setting is enabled, inferred annotations are only available from the menu for nested definitions, but not for top-level ones.

Possible Solution

Steps to Reproduce (for bugs)

  1. Start vscode and enable "Only Update Diagnostics On Save"
  2. Open a new file Test.elm and insert the following code:
module Test exposing (..)


cubed x =
    let
        squared y =
            y * y
    in
    squared x * x
  1. Save the file.
  2. Click on cubed and type Ctrl-. to bring up the quick-fix menu.

Context

Your Environment

  • Version used: 2.2.0 (also present in previous version)
  • Editor used: vscode 1.57.0
  • Environment name and version (e.g. node.js 5.4): elm 0.19.1
  • Operating System and version: Windows 10
@odf odf changed the title Inferred type annotation for top-level definitions is unavailable in vscode when diagnostics are only update on save Inferred type annotation for top-level definitions is unavailable in vscode when diagnostics are only updated on save Jun 12, 2021
@razzeee razzeee added the bug Something isn't working label Jun 12, 2021
@derrickbeining
Copy link

Ah! Been wondering why that code action stopped being available. Can confirm, I'm seeing this too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants