merlin icon indicating copy to clipboard operation
merlin copied to clipboard

Destructing punned record field breaks syntax

Open bcc32 opened this issue 2 years ago • 1 comments

Consider the following code:

type t =
  { a : int * int
  ; b : string
  }

let f ({ a; b } : t) = assert false

With the cursor at record field a on the last line of the snippet, executing destruct gives:

let f ({ (_, _); b } : t) = assert false

whereas the expected result should be something like:

let f ({ a = (_, _); b } : t) = assert false

bcc32 avatar Aug 15 '23 16:08 bcc32

Thanks for the report, I was able to reproduce the issue.

voodoos avatar Aug 23 '23 14:08 voodoos