Skip to content

Commit

Permalink
add failing test for signature help when using pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
zth committed Nov 8, 2022
1 parent 2774687 commit 417b0ee
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions analysis/tests/src/SignatureHelp.res
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ let iAmSoSpecial = (iJustHaveOneArg: string) => {

// let _ = iAmSoSpecial(
// ^she

// let _ = "hello"->otherFunc(1
// ^she
20 changes: 19 additions & 1 deletion analysis/tests/src/expected/SignatureHelp.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ extracted params:

Signature help src/SignatureHelp.res 50:24
posCursor:[50:23] posNoWhite:[50:22] Found expr:[50:11->50:24]
Pexp_apply ...[50:11->50:23] (...[53:0->50:24])
Pexp_apply ...[50:11->50:23] (...[56:0->50:24])
posCursor:[50:23] posNoWhite:[50:22] Found expr:[50:11->50:23]
Pexp_ident iAmSoSpecial:[50:11->50:23]
argAtCursor: none
Expand All @@ -197,3 +197,21 @@ extracted params:
"activeParameter": 0
}

Signature help src/SignatureHelp.res 53:31
posCursor:[53:29] posNoWhite:[53:28] Found expr:[53:11->53:31]
posCursor:[53:29] posNoWhite:[53:28] Found expr:[53:20->53:31]
Pexp_apply ...[53:20->53:29] (...[53:30->53:31])
posCursor:[53:29] posNoWhite:[53:28] Found expr:[53:20->53:29]
Pexp_ident otherFunc:[53:20->53:29]
argAtCursor: unlabelled<0>
extracted params:
[(string, int, float]
{
"signatures": [{
"label": "let otherFunc: (string, int, float) => unit",
"parameters": [{"label": [15, 22], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [24, 27], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [29, 34], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}]
}],
"activeSignature": 0,
"activeParameter": 0
}

0 comments on commit 417b0ee

Please sign in to comment.