Skip to content

Commit 8250c3f

Browse files
committed
Handle record patterns.
1 parent 2c8320c commit 8250c3f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

analysis/src/ProcessCmt.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ let rec forItem ~env ~(exported : exported) item =
322322
in
323323
[{declared with item = MValue declared.item}]
324324
| Tpat_tuple pats -> pats |> List.map (handlePattern []) |> List.flatten
325+
| Tpat_record (items, _) ->
326+
items |> List.map (fun (_, _, p) -> handlePattern [] p) |> List.flatten
325327
| _ -> []
326328
in
327329
List.map

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ Definition tests/src/Patterns.res 12:10
22
{"uri": "Patterns.res", "range": {"start": {"line": 3, "character": 7}, "end": {"line": 3, "character": 10}}}
33

44
Definition tests/src/Patterns.res 17:11
5-
null
5+
{"uri": "Patterns.res", "range": {"start": {"line": 9, "character": 7}, "end": {"line": 9, "character": 11}}}
66

0 commit comments

Comments
 (0)