diff options
author | Thomas Refis <thomas.refis@gmail.com> | 2018-01-23 09:19:00 +0000 |
---|---|---|
committer | Thomas Refis <thomas.refis@gmail.com> | 2018-01-23 09:19:15 +0000 |
commit | 050ad579a9adbcfbb92f4130104cf767e0159668 (patch) | |
tree | 1b1f8660307e7cda05b4aad1669754616eb14b3c | |
parent | eef45d72c3f3d170421d26cafc0e95483faec361 (diff) | |
download | ocaml-050ad579a9adbcfbb92f4130104cf767e0159668.tar.gz |
pr7712: add a test
-rw-r--r-- | testsuite/tests/typing-misc/pr7712.ml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/typing-misc/pr7712.ml b/testsuite/tests/typing-misc/pr7712.ml new file mode 100644 index 0000000000..09ffb4d297 --- /dev/null +++ b/testsuite/tests/typing-misc/pr7712.ml @@ -0,0 +1,20 @@ +(* TEST + * expect +*) + +type 'a or_error = string + +type ('a, 'b) t_ = + | Bar : ('a, 'a or_error) t_ + +type 'a t = ('a, 'a) t_ + +let f : type a. a t -> a t = function + | Bar -> Bar +;; +[%%expect{| +type 'a or_error = string +type ('a, 'b) t_ = Bar : ('a, 'a or_error) t_ +type 'a t = ('a, 'a) t_ +val f : 'a t -> 'a t = <fun> +|}];; |