diff --git a/testsuite/tests/typing-poly/pr11544.ml b/testsuite/tests/typing-poly/pr11544.ml new file mode 100644 index 000000000000..c93f399fa0a7 --- /dev/null +++ b/testsuite/tests/typing-poly/pr11544.ml @@ -0,0 +1,18 @@ +(* TEST + * expect +*) + +module M = struct type t = T end +let poly3 : 'b. M.t -> 'b -> 'b = + fun T x -> x +[%%expect {| +module M : sig type t = T end +val poly3 : M.t -> 'b -> 'b = +|}, Principal{| +module M : sig type t = T end +Line 3, characters 6-7: +3 | fun T x -> x + ^ +Warning 18 [not-principal]: this type-based constructor disambiguation is not principal. +val poly3 : M.t -> 'b -> 'b = +|}];;