summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Refis <thomas.refis@gmail.com>2018-01-23 09:19:00 +0000
committerThomas Refis <thomas.refis@gmail.com>2018-01-23 09:19:15 +0000
commit050ad579a9adbcfbb92f4130104cf767e0159668 (patch)
tree1b1f8660307e7cda05b4aad1669754616eb14b3c
parenteef45d72c3f3d170421d26cafc0e95483faec361 (diff)
downloadocaml-050ad579a9adbcfbb92f4130104cf767e0159668.tar.gz
pr7712: add a test
-rw-r--r--testsuite/tests/typing-misc/pr7712.ml20
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>
+|}];;