merlin
merlin copied to clipboard
Expanding any-pat in a match doesn't account for already matched cases
Expanding any-pat in a pattern match doesn't account for already matched cases, see the example:
type t = A | B
let f (x : t) = match x with
| A -> 1
| _ (* I want to destruct [_] and get the missing cases, ie [B] for this example but get [A | B] *)
$ ocamlmerlin single case-analysis -start 4:3 -end 4:3 <<EOF
type t = A | B
let f (x : t) = match x with
| A -> 1
| _ -> 1
EOF
{"class":"return","value":[{"start":{"line":4,"col":2},"end":{"line":4,"col":3}},"A |B"],"notifications":[],"timing":{"clock":5,"cpu":5,"query":0,"pp":0,"reader":1,"ppx":0,"typer":3,"error":0}}