I'm wondering whether #13839 meant to introduce this change in how the following program gets type checked (cc @nojb).Take this minimal example:
type 'a t
let dog : 'this =
let module Dog = struct
external make
: bark:('self -> unit)
-> < bark : ('self -> unit) > t = "" ""
end
in
Dog.make ~bark:(fun (o : 'this) -> ())
Before #13839:
$ ocamlc -stop-after typing x.ml
$ echo $?
0
After #13839:
$ ./ocamlc.opt -I stdlib -stop-after typing x.ml
File "x.ml", line 4, characters 4-7:
4 | let dog : 'this =
^^^
Error: The type of this expression, < bark : '_this -> unit > t,
contains the non-generalizable type variable(s): '_this.
(see manual section 6.1.2)
I'm wondering whether #13839 meant to introduce this change in how the following program gets type checked (cc @nojb).Take this minimal example:
Before #13839:
After #13839: