-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fatal error: exception Assert_failure("typing/ctype.ml", 1891, 19) #6163
Copy link
Copy link
Closed
Description
Original bug ID: 6163
Reporter: @lpw25
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2016-12-07T10:37:13Z)
Resolution: fixed
Priority: normal
Severity: crash
Version: 4.01.0+beta/+rc
Fixed in version: 4.01.0+dev
Category: typing
Related to: #6716
Bug description
The following causes an exception in the toplevel:
OCaml version 4.01.0+rc1
type _ nat =
Zero : [`Zero] nat
| Succ : 'a nat -> [`Succ of 'a] nat;;
type _ nat = Zero : [ `Zero ] nat | Succ : 'a nat -> [ `Succ of 'a ] nat
let f x =
let module Aux = struct
type aux = Aux : [ `Succ of [< `Succ of [< `Succ of [< `Succ of [`Zero] | `Zero] | `Zero] | `Zero] ] nat -> aux
end in
let f (type t) ((Aux.Aux x) : Aux.aux) =
match x with
Succ Zero -> "1"
| Succ (Succ Zero) -> "2"
| Succ (Succ (Succ Zero)) -> "3"
| Succ (Succ (Succ (Succ Zero))) -> "4"
in
f (Aux.Aux x);;
Fatal error: exception Assert_failure("typing/ctype.ml", 1891, 19)
Process ocaml-toplevel exited abnormally with code 2
Reactions are currently unavailable