diff options
| author | Thomas Refis <thomas.refis@gmail.com> | 2019-09-02 11:43:26 +0100 |
|---|---|---|
| committer | Thomas Refis <thomas.refis@gmail.com> | 2019-09-11 13:44:31 -0400 |
| commit | 6f492fdbd9c352c0502c118a80d451b8867b1dae (patch) | |
| tree | 7957c84f5a7425a87a8aaa99f261f18750daec3f /testsuite/tests/typing-modules | |
| parent | f814450b605852429613e4ae7f68bac0382e3f1d (diff) | |
| download | ocaml-pr8908.tar.gz | |
PR#8908: used as a base for other PRs.pr8908
Diffstat (limited to 'testsuite/tests/typing-modules')
| -rw-r--r-- | testsuite/tests/typing-modules/anonymous.ml | 39 | ||||
| -rw-r--r-- | testsuite/tests/typing-modules/ocamltests | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/tests/typing-modules/anonymous.ml b/testsuite/tests/typing-modules/anonymous.ml new file mode 100644 index 0000000000..c250e922f1 --- /dev/null +++ b/testsuite/tests/typing-modules/anonymous.ml @@ -0,0 +1,39 @@ +(* TEST + * expect +*) + +module _ = struct end;; +[%%expect{| +|}];; + +module rec A : sig + type t = B.t +end = A +and _ : sig type t = A.t end = struct type t = A.t end +and B : sig type t end = B +;; +[%%expect{| +module rec A : sig type t = B.t end +and B : sig type t end +|}] + +module type S = sig + module _ : sig end + + module rec A : sig + type t = B.t + end + and _ : sig type t = A.t end + and B : sig type t end +end +;; +[%%expect{| +module type S = + sig module rec A : sig type t = B/2.t end and B : sig type t end end +|}] + +let f (module _ : S) = () +;; +[%%expect{| +val f : (module S) -> unit = <fun> +|}] diff --git a/testsuite/tests/typing-modules/ocamltests b/testsuite/tests/typing-modules/ocamltests index 23413d7c5a..72d6aa5f01 100644 --- a/testsuite/tests/typing-modules/ocamltests +++ b/testsuite/tests/typing-modules/ocamltests @@ -1,4 +1,5 @@ aliases.ml +anonymous.ml applicative_functor_type.ml firstclass.ml generative.ml |
