summaryrefslogtreecommitdiff
path: root/testsuite/tests/letrec-check/pr7215.ml
blob: 487cdc3ede59d4001df8e84e9306605f4e273bdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
(* TEST
 toplevel;
*)

(* From Stephen Dolan *)
type (_,_) eq = Refl : ('a, 'a) eq;;
let cast (type a) (type b) (Refl : (a, b) eq) (x : a) = (x : b);;

let is_int (type a) =
  let rec (p : (int, a) eq) = match p with Refl -> Refl in
  p

let bang = print_string (cast (is_int : (int, string) eq) 42);;