Skip to content

Commit 417b0ee

Browse files
committed
add failing test for signature help when using pipe
1 parent 2774687 commit 417b0ee

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

analysis/tests/src/SignatureHelp.res

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,6 @@ let iAmSoSpecial = (iJustHaveOneArg: string) => {
5050

5151
// let _ = iAmSoSpecial(
5252
// ^she
53+
54+
// let _ = "hello"->otherFunc(1
55+
// ^she

analysis/tests/src/expected/SignatureHelp.res.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ extracted params:
182182

183183
Signature help src/SignatureHelp.res 50:24
184184
posCursor:[50:23] posNoWhite:[50:22] Found expr:[50:11->50:24]
185-
Pexp_apply ...[50:11->50:23] (...[53:0->50:24])
185+
Pexp_apply ...[50:11->50:23] (...[56:0->50:24])
186186
posCursor:[50:23] posNoWhite:[50:22] Found expr:[50:11->50:23]
187187
Pexp_ident iAmSoSpecial:[50:11->50:23]
188188
argAtCursor: none
@@ -197,3 +197,21 @@ extracted params:
197197
"activeParameter": 0
198198
}
199199

200+
Signature help src/SignatureHelp.res 53:31
201+
posCursor:[53:29] posNoWhite:[53:28] Found expr:[53:11->53:31]
202+
posCursor:[53:29] posNoWhite:[53:28] Found expr:[53:20->53:31]
203+
Pexp_apply ...[53:20->53:29] (...[53:30->53:31])
204+
posCursor:[53:29] posNoWhite:[53:28] Found expr:[53:20->53:29]
205+
Pexp_ident otherFunc:[53:20->53:29]
206+
argAtCursor: unlabelled<0>
207+
extracted params:
208+
[(string, int, float]
209+
{
210+
"signatures": [{
211+
"label": "let otherFunc: (string, int, float) => unit",
212+
"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```"}}]
213+
}],
214+
"activeSignature": 0,
215+
"activeParameter": 0
216+
}
217+

0 commit comments

Comments
 (0)