Skip to content

Calling locate inside a pattern matching does not redirect to the record definition #1523

@kit-ty-kate

Description

@kit-ty-kate
type t = {
  data : int;
}

let f {data} =
  data + 1

let g x =
  x.data + 1

looking at this simple example:

  • In g, calling locate on data will redirect to the type t
  • But in f, calling locate on data fails with Already at definition point

I understand the reasoning behind it but I feel like it would be nice to also redirect to the type t in the case of f.

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