nojebar@PERVERSESHEAF:~/tmp$ cat bug.ml
class type gui =
object
method sub: 'b. 'b -> 'b
end
class virtual local_sub =
object
method virtual sub: 'b. 'b -> 'b option
end
class virtual ['a] compound_gui =
object (_: #gui)
constraint 'a = #local_sub
end
nojebar@PERVERSESHEAF:~/tmp$ opam exec --switch 4.14.2 -- ocaml bug.ml
nojebar@PERVERSESHEAF:~/tmp$ opam exec --switch 5.1.0 -- ocaml bug.ml
nojebar@PERVERSESHEAF:~/tmp$ opam exec --switch 5.2.0 -- ocaml bug.ml
nojebar@PERVERSESHEAF:~/tmp$ opam exec --switch 5.3.0+trunk -- ocaml bug.ml
>> Fatal error: Ctype.unify_univar: univar not in scope
Fatal error: exception Misc.Fatal_error
(The example is extracted from a much larger codebase.)
(The example is extracted from a much larger codebase.)