summaryrefslogtreecommitdiff
path: root/testsuite/tests/typing-fstclassmod/fstclassmod.ml
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typing-fstclassmod/fstclassmod.ml')
-rw-r--r--testsuite/tests/typing-fstclassmod/fstclassmod.ml15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typing-fstclassmod/fstclassmod.ml b/testsuite/tests/typing-fstclassmod/fstclassmod.ml
index 268d35d492..82af377bec 100644
--- a/testsuite/tests/typing-fstclassmod/fstclassmod.ml
+++ b/testsuite/tests/typing-fstclassmod/fstclassmod.ml
@@ -139,3 +139,18 @@ end
let () =
print_endline (Print.to_string int 10);
print_endline (Print.to_string (pair int (pair str int)) (123, ("A", 456)))
+
+
+(* #6262: first-class modules and module type aliases *)
+
+module type S1 = sig end
+module type S2 = S1
+
+let f (x : (module S1)) : (module S2) = x
+
+module X = struct
+ module type S
+end
+module Y = struct include X end
+
+let f (x : (module X.S)) : (module Y.S) = x