diff options
author | Florian Angeletti <octa@polychoron.fr> | 2018-08-17 22:48:47 +0200 |
---|---|---|
committer | Florian Angeletti <octa@polychoron.fr> | 2018-08-22 12:30:58 +0200 |
commit | 1e9d264727caa39069ae2576b350fab76b37bbf9 (patch) | |
tree | 90255ecef5a2260bb312c566ed17a08b4ddc8973 /testsuite | |
parent | f6a9f0e9f75d12a7e88059628bf76421d39b7928 (diff) | |
download | ocaml-1e9d264727caa39069ae2576b350fab76b37bbf9.tar.gz |
contextualization for unbound type variable error
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/typing-misc/ocamltests | 1 | ||||
-rw-r--r-- | testsuite/tests/typing-misc/typetexp_errors.ml | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/typing-misc/ocamltests b/testsuite/tests/typing-misc/ocamltests index 8af4d8e799..be8fde57c8 100644 --- a/testsuite/tests/typing-misc/ocamltests +++ b/testsuite/tests/typing-misc/ocamltests @@ -22,3 +22,4 @@ empty_variant.ml typecore_errors.ml typecore_nolabel_errors.ml typecore_empty_polyvariant_error.ml +typetexp_errors.ml
\ No newline at end of file diff --git a/testsuite/tests/typing-misc/typetexp_errors.ml b/testsuite/tests/typing-misc/typetexp_errors.ml new file mode 100644 index 0000000000..c430d794d4 --- /dev/null +++ b/testsuite/tests/typing-misc/typetexp_errors.ml @@ -0,0 +1,13 @@ +(* TEST + * expect +*) + +type ('a,'at,'any,'en) t = A of 'an +[%%expect {| +Line 1, characters 32-35: + type ('a,'at,'any,'en) t = A of 'an + ^^^ +Error: The type variable 'an is unbound in this type declaration. +Hint: Did you mean 'a, 'any, 'at or 'en? +|} +] |