Skip to content

Commit 803c023

Browse files
committed
fix signature help after refactor
1 parent 3956c59 commit 803c023

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

analysis/src/SignatureHelp.ml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,18 @@ let signatureHelp ~path ~pos ~currentFile ~debug ~allowForConstructorPayloads =
484484
let argCount = !unlabelledArgCount in
485485
unlabelledArgCount := argCount + 1;
486486
match (lbl, argLabel) with
487-
| Asttypes.Nolabel, Asttypes.Nolabel
487+
| ( Asttypes.Optional {txt = l1},
488+
Asttypes.Optional {txt = l2} )
489+
when l1 = l2 ->
490+
true
491+
| ( Labelled {txt = l1},
492+
Labelled {txt = l2} )
493+
when l1 = l2 ->
494+
true
495+
| Nolabel, Nolabel
488496
when paramArgCount = argCount ->
489497
true
490-
| _ ->
491-
Asttypes.same_arg_label lbl
492-
argLabel)
498+
| _ -> false)
493499
with
494500
| None ->
495501
{Protocol.kind = "markdown"; value = ""}

0 commit comments

Comments
 (0)