Skip to content

Incorrect renaming for the parameter in pattern matching #375

@jubnzv

Description

@jubnzv

Hello,

I encountered with the problem when I tried to rename the parameter in the pattern matching statement.

Here is a demo:

demo

The source code of this example:

type s = S1 of string

let test s1 s2 =
  match (s1,s2) with
  | (Some(s1), Some(s2)) -> Some(s1)
  | _ -> None

let ()=
  let _ = test (Some(S1("123"))) None in ()

ocaml-lsp version: 1.3.0
Text editor: latest neovim nightly with built-in LSP client. It runs ocaml-lsp without extra CLI arguments.

Can you reproduce this? I think the problem can be in ocaml-lsp, because my LSP client works great in other cases.

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