Skip to content

Commit

Permalink
Merge branch 'main' into GetSubTextFromRange
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf authored Jan 2, 2024
2 parents a13da08 + a999b77 commit 9bc92f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Fantomas.Core/ASTTransformer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,9 @@ let mkTuplePat (creationAide: CreationAide) (pats: SynPat list) (commas: range l
| [] -> failwith "SynPat.Tuple with no elements"
| head :: tail ->
let rest =
assert (tail.Length = commas.Length)
if tail.Length <> commas.Length then
failwith
$"Number of elements in tail of tuple (%i{tail.Length}) was not equal to number of commas (%i{commas.Length}), at range %O{m}."

List.zip commas tail
|> List.collect (fun (c, e) -> [ yield Choice2Of2(stn "," c); yield Choice1Of2(mkPat creationAide e) ])
Expand Down

0 comments on commit 9bc92f0

Please sign in to comment.