Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
changelog + fix
  • Loading branch information
zth committed May 25, 2024
commit beb5ed4c0f873bdaa4d765e5d01485d0ac8b0332
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- Emit `%todo` instead of `failwith("TODO")` when we can (ReScript >= v11.1). https://github.com/rescript-lang/rescript-vscode/pull/981
- Complete `%todo`. https://github.com/rescript-lang/rescript-vscode/pull/981
- Add code action for extracting a locally defined module into its own file. https://github.com/rescript-lang/rescript-vscode/pull/983
- Add code action for expanding catch-all patterns. https://github.com/rescript-lang/rescript-vscode/pull/987

## 1.50.0

Expand Down
2 changes: 1 addition & 1 deletion analysis/src/Xform.ml
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ module ExpandCatchAllForVariants = struct
"Some("
^ (missingConstructors
|> List.map (fun (name, hasArgs) ->
name ^ if hasArgs then "" else "(_)")
name ^ if hasArgs then "(_)" else "")
|> String.concat " | ")
^ ")"
in
Expand Down
4 changes: 2 additions & 2 deletions analysis/tests/src/expected/Xform.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ TextDocumentEdit: Xform.res
{"start": {"line": 96, "character": 2}, "end": {"line": 96, "character": 3}}
newText:
<--here
Some(Second(_) | Third(_) | Fourth) | None
Some(Second | Third | Fourth(_)) | None

Xform src/Xform.res 105:4
posCursor:[102:16] posNoWhite:[102:14] Found expr:[102:9->107:1]
Expand All @@ -255,5 +255,5 @@ TextDocumentEdit: Xform.res
{"start": {"line": 105, "character": 2}, "end": {"line": 105, "character": 3}}
newText:
<--here
Some(#"illegal identifier"(_) | #second(_) | #third)
Some(#"illegal identifier" | #second | #third(_))