blob: 668c521968cac4f73521b291d558f58b32975f83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
(* TEST_BELOW
(* Blank lines added here to preserve locations. *)
*)
type 'a dyn = Int : int -> int dyn | Float : float -> float dyn;;
let f (Float x) = x;;
Format.printf "%f\n%!" (f (Float 3.1415));;
try Printexc.print f (Obj.magic (Int 3)) with _ -> 0.;;
(* TEST
flags += "-safer-matching";
*)
|