-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Misbehaviour with abstracted structural type used as GADT index #5785
Copy link
Copy link
Closed
Labels
Description
Original bug ID: 5785
Reporter: @yallop
Assigned to: @garrigue
Status: closed (set by @garrigue on 2012-10-12T01:44:21Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 4.00.1
Fixed in version: 4.00.2+dev
Category: typing
Child of: #5998
Monitored by: @diml @alainfrisch
Bug description
$ cat test.ml
module Add (T : sig type two end) =
struct
type _ t =
| One : [`One] t
| Two : T.two t
let add (type a) : a t * a t -> string = function
| One, One -> "two"
| Two, Two -> "four"
end
module M = Add(struct type two = [`One] end)
let _ =
begin
print_endline (M.add (M.One, M.Two));
print_endline (M.add (M.Two, M.One));
end
$ ocamlc -w A test.ml -o test
$ ./test
two
four
File attachments
Reactions are currently unavailable