Skip to content

LSP quickfix doesn't account for generic params when replacing inline #1199

@KtorZ

Description

@KtorZ

What Git revision are you using?

v1.1.9

What operating system are you using, and which version?

  • Linux / Ubuntu
  • Linux / Other
  • macOS
  • Windows

Describe what the problem is?

Given the following code and a missing import for Dict

fn foo(
  my_dict: Dict<k, v>
) -> whatever

The language-server correctly suggests to either import Dict, or to replace it with its qualified version dict.Dict. The latter, however, will get rid of the generic params <k, v>; thus leading to another error since the type expects two generic params.

What should be the expected behavior?

Replacing inline with a qualified type should preserve any existing generic parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lspLanguage Server

    Type

    Projects

    Status

    🔨 Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions