summaryrefslogtreecommitdiff
path: root/testsuite/tests/typing-short-paths/short-paths.ml
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typing-short-paths/short-paths.ml')
-rw-r--r--testsuite/tests/typing-short-paths/short-paths.ml48
1 files changed, 48 insertions, 0 deletions
diff --git a/testsuite/tests/typing-short-paths/short-paths.ml b/testsuite/tests/typing-short-paths/short-paths.ml
new file mode 100644
index 0000000000..5616090606
--- /dev/null
+++ b/testsuite/tests/typing-short-paths/short-paths.ml
@@ -0,0 +1,48 @@
+module Core = struct
+ module Int = struct
+ module T = struct
+ type t = int
+ let compare = compare
+ let (+) x y = x + y
+ end
+ include T
+ module Map = Map.Make(T)
+ end
+
+ module Std = struct
+ module Int = Int
+ end
+end
+;;
+
+open Core.Std
+;;
+
+let x = Int.Map.empty ;;
+let y = x + x ;;
+
+(* Avoid ambiguity *)
+
+module M = struct type t = A type u = C end
+module N = struct type t = B end
+open M open N;;
+A;;
+B;;
+C;;
+
+include M open M;;
+C;;
+
+module L = struct type v = V end
+open L;;
+V;;
+module L = struct type v = V end
+open L;;
+V;;
+
+
+type t1 = A;;
+module M1 = struct type u = v and v = t1 end;;
+module N1 = struct type u = v and v = M1.v end;;
+type t1 = B;;
+module N2 = struct type u = v and v = M1.v end;;