Skip to content

Find References misses uses of a functor application whose .resi writes out the signature #9508

Backlog

Description

@cknitt

Find References on a functor's member misses uses of a functor application when the application's .resi writes out its signature instead of naming the functor's result.

// Fn.res
module type Ord = {
  type t
}
module IntOrd = {
  type t = int
}
module MakeSet = (O: Ord) => {
  let add = (x: O.t) => [x]
}

// I.res
module App = Fn.MakeSet(Fn.IntOrd)

// I.resi
module App: {
  let add: int => array<int>
}

// U.res
let u = I.App.add(1)

Find References on add in Fn.res finds only the declaration. It misses add in I.resi and I.App.add in U.res. Rename then changes Fn.res alone, and I.res no longer matches I.resi.

The use in U.res resolves to the declaration in I.resi, and the signature in I.resi has no link back to Fn.MakeSet. The link is only in I.res, where the module App is the functor application.

Without I.resi the uses are found (with #9329).

Seen on master 0a686a9, and with #9329 applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions