merlin icon indicating copy to clipboard operation
merlin copied to clipboard

refactor-open rewriting the whole record instead of a field label

Open ulugbekna opened this issue 4 years ago • 0 comments

refactor-open is rewriting the whole record instead of a record field label.

This

module M = struct
  type r = { i : int }
end

open M

let r = { M.i = 1 }

is rewritten to

module M = struct
  type r = { i : int }
end

open M

let r = i

This seems to happen because Record_field constructor in node_paths fn at browse_raw.ml:864 contains location for the whole record.

ulugbekna avatar Apr 08 '21 11:04 ulugbekna