diff options
author | Nick Barnes <nick@tarides.com> | 2023-05-02 21:16:12 +0100 |
---|---|---|
committer | Nick Barnes <nick@tarides.com> | 2023-05-02 21:16:12 +0100 |
commit | d3a5c923939a1fc03cc14c005d61210d8c3bd546 (patch) | |
tree | 5459de2b7b6cbaa1167d18224f1ea5d256e2f3f7 /testsuite/tests/typing-modules/nongen.ml | |
parent | ad111da274b58d82249f92b8c79ee252bf25525b (diff) | |
parent | 23dab79a4e42856aa33816b9c79c3d4d79959cb9 (diff) | |
download | ocaml-d3a5c923939a1fc03cc14c005d61210d8c3bd546.tar.gz |
Merge branch 'trunk' into nick-get-copy
Diffstat (limited to 'testsuite/tests/typing-modules/nongen.ml')
-rw-r--r-- | testsuite/tests/typing-modules/nongen.ml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/typing-modules/nongen.ml b/testsuite/tests/typing-modules/nongen.ml new file mode 100644 index 0000000000..9aca5a1f88 --- /dev/null +++ b/testsuite/tests/typing-modules/nongen.ml @@ -0,0 +1,23 @@ +(* TEST + expect; +*) + +module X = struct + let t = ref None +end + +module type X' = module type of X +[%%expect{| +module X : sig val t : '_weak1 option ref end +Line 5, characters 32-33: +5 | module type X' = module type of X + ^ +Error: The type of this module, sig val t : '_weak1 option ref end, + contains non-generalizable type variable(s). + (see manual section 6.1.2) +Line 2, characters 6-7: +2 | let t = ref None + ^ + The type of this value, '_weak1 option ref, + contains the non-generalizable type variable(s) '_weak1. +|}] |