Skip to content

Commit

Permalink
flambda-backend: Fix missing End_region primitives on switch arms (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
lthls authored Oct 19, 2022
1 parent 7fa7f9d commit 5a977e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions testsuite/tests/typing-local/regions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ let () = check_empty "toplevel rec binding"
());;
let () = check_empty "toplevel eval"

let () =
let f x b g =
let local_ p = x, x in
if b then () else (g p; ())
in f 0 true (fun _ -> ())
let () = check_empty "constant switch arm"

module type T = sig val x : int end
let _ =
let module M : T =
Expand Down
1 change: 1 addition & 0 deletions testsuite/tests/typing-local/regions.reference
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
toplevel binding: OK
toplevel rec binding: OK
toplevel eval: OK
constant switch arm: OK
first class mod: OK
class d definition: OK
class definitions: OK
Expand Down

0 comments on commit 5a977e4

Please sign in to comment.