Skip to content

Commit d03de16

Browse files
committed
add nested destructure test
1 parent 011dd84 commit d03de16

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

analysis/tests/src/CompletionPattern.res

+3
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,6 @@ let _ = switch f {
7575

7676
// let {} = f
7777
// ^com
78+
79+
// let {nest: {n}}} = f
80+
// ^com

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

+14
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,17 @@ Completable: Cpattern Value[f]->recordBody
244244
"documentation": null
245245
}]
246246

247+
Complete src/CompletionPattern.res 78:16
248+
looking for: Cpath Value[f]
249+
posCursor:[78:16] posNoWhite:[78:15] Found pattern:[78:7->78:18]
250+
posCursor:[78:16] posNoWhite:[78:15] Found pattern:[78:14->78:17]
251+
posCursor:[78:16] posNoWhite:[78:15] Found pattern:[78:15->78:16]
252+
Completable: Cpattern Value[f]=n->recordField(nest), recordBody
253+
[{
254+
"label": "nested",
255+
"kind": 5,
256+
"tags": [],
257+
"detail": "nested: bool\n\nnestedRecord",
258+
"documentation": null
259+
}]
260+

0 commit comments

Comments
 (0)