Skip to content

Commit ba5c77a

Browse files
committed
pivot_at reverses order of the traversed list. This can cause issues when reconstructing the match so we undo.
1 parent 3866ec1 commit ba5c77a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/ecMatching.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ module Zipper = struct
230230
with Not_found -> raise InvalidCPos
231231
in
232232
let prebr, (locals, body), postbr = List.pivot_at ix bs in
233+
let prebr = List.rev prebr in
233234
let env = EcEnv.Var.bind_locals locals env in
234235
(ZMatch (e, ((s1, s2), zpr), { locals; prebr; postbr; }), body), env
235236

0 commit comments

Comments
 (0)