Skip to content

Commit 01501e4

Browse files
committed
add failing tests for nested signature help
1 parent 09521e4 commit 01501e4

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

analysis/tests/src/SignatureHelp.res

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,9 @@ let fn = (age: int, name: string, year: int) => {
6868

6969
// let _ = fn(12, "hello", )
7070
// ^she
71+
72+
// let _ = fn({ iAmSoSpecial() })
73+
// ^she
74+
75+
// let _ = fn({ iAmSoSpecial({ someFunc() }) })
76+
// ^she

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,37 @@ extracted params:
266266
"activeParameter": 2
267267
}
268268

269+
Signature help src/SignatureHelp.res 71:29
270+
posCursor:[71:13] posNoWhite:[71:12] Found expr:[71:11->71:33]
271+
Pexp_apply ...[71:11->71:13] (...[71:16->71:30])
272+
posCursor:[71:13] posNoWhite:[71:12] Found expr:[71:11->71:13]
273+
Pexp_ident fn:[71:11->71:13]
274+
argAtCursor: unlabelled<0>
275+
extracted params:
276+
[(int, string, int]
277+
{
278+
"signatures": [{
279+
"label": "(int, string, int) => unit",
280+
"parameters": [{"label": [0, 4], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [6, 12], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [14, 17], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}]
281+
}],
282+
"activeSignature": 0,
283+
"activeParameter": 0
284+
}
285+
286+
Signature help src/SignatureHelp.res 74:40
287+
posCursor:[74:13] posNoWhite:[74:12] Found expr:[74:11->74:47]
288+
Pexp_apply ...[74:11->74:13] (...[74:16->74:44])
289+
posCursor:[74:13] posNoWhite:[74:12] Found expr:[74:11->74:13]
290+
Pexp_ident fn:[74:11->74:13]
291+
argAtCursor: unlabelled<0>
292+
extracted params:
293+
[(int, string, int]
294+
{
295+
"signatures": [{
296+
"label": "(int, string, int) => unit",
297+
"parameters": [{"label": [0, 4], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [6, 12], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [14, 17], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}]
298+
}],
299+
"activeSignature": 0,
300+
"activeParameter": 0
301+
}
302+

0 commit comments

Comments
 (0)