Polymorphic type annotations generalize weak polymorphic variables, making such programs type check and segfault:
let f x =
let ref : type a . a option ref = ref None in
ref := Some x;
Option.get !ref
let () = print_string (f 0)
This program is rejected by OCaml 4.10 but is accepted by OCaml 4.11 and trunk. Bisection points to the commit c272447.
Polymorphic type annotations generalize weak polymorphic variables, making such programs type check and segfault:
This program is rejected by OCaml 4.10 but is accepted by OCaml 4.11 and trunk. Bisection points to the commit c272447.