Skip to content

Commit

Permalink
fixup! Marshalling a continuation should fail
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Dec 14, 2022
1 parent 5548318 commit 7deb7d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions compiler/tests-ocaml/lib-effects/marshal.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ let _ =
Some (fun k ->
(* We have to make sure that neither the match nor the call
to Marshal.to_string are eliminated, so we call
print_string and we return the result of the marshalling
print_string and we print the result of the marshalling
function. *)
match print_string ""; Stdlib.Marshal.to_string k [] with
| x -> x
| exception ((*Invalid_argument*) _) -> print_endline "ok"; ""
match print_string "";
Stdlib.Marshal.to_string k [] with
| x -> Printf.printf "%S" x; assert false
| exception (Invalid_argument _) -> print_endline "ok"; ""
) }
2 changes: 1 addition & 1 deletion compiler/tests-ocaml/lib-effects/marshal.reference
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Aok
ok

0 comments on commit 7deb7d8

Please sign in to comment.