diff options
author | Hugo Heuzard <hugo.heuzard@gmail.com> | 2018-04-06 19:57:18 +0100 |
---|---|---|
committer | Hugo Heuzard <hugo.heuzard@gmail.com> | 2018-04-09 22:29:46 +0100 |
commit | 44eb9d4a57fcb35031800e85b44a676a998874bc (patch) | |
tree | dea69b87fa8dfcd27b482275ff65dd78d1a73a60 /testsuite/tests/warnings | |
parent | 7835cbb9bde87c4dbe2c6697e278c544494c9ef5 (diff) | |
download | ocaml-44eb9d4a57fcb35031800e85b44a676a998874bc.tar.gz |
warning when [@@deprecated] is present on exceptions
Diffstat (limited to 'testsuite/tests/warnings')
-rw-r--r-- | testsuite/tests/warnings/ocamltests | 1 | ||||
-rw-r--r-- | testsuite/tests/warnings/w03.compilers.reference | 4 | ||||
-rw-r--r-- | testsuite/tests/warnings/w03.ml | 24 |
3 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/tests/warnings/ocamltests b/testsuite/tests/warnings/ocamltests index 2f143cf83a..fa3318d206 100644 --- a/testsuite/tests/warnings/ocamltests +++ b/testsuite/tests/warnings/ocamltests @@ -2,6 +2,7 @@ deprecated_module_assigment.ml deprecated_module.ml deprecated_module_use.ml w01.ml +w03.ml w04_failure.ml w04.ml w06.ml diff --git a/testsuite/tests/warnings/w03.compilers.reference b/testsuite/tests/warnings/w03.compilers.reference new file mode 100644 index 0000000000..7074abd227 --- /dev/null +++ b/testsuite/tests/warnings/w03.compilers.reference @@ -0,0 +1,4 @@ +File "w03.ml", line 14, characters 8-9: +Warning 3: deprecated: A +File "w03.ml", line 17, characters 15-25: +Warning 53: the "deprecated" attribute cannot appear in this context diff --git a/testsuite/tests/warnings/w03.ml b/testsuite/tests/warnings/w03.ml new file mode 100644 index 0000000000..b9f70b1df5 --- /dev/null +++ b/testsuite/tests/warnings/w03.ml @@ -0,0 +1,24 @@ +(* TEST + +flags = "-w A" + +* setup-ocamlc.byte-build-env +** ocamlc.byte +compile_only = "true" +*** check-ocamlc.byte-output + +*) + +exception A [@deprecated] + +let _ = A + + +exception B [@@deprecated] + +let _ = B + + +exception C [@deprecated] + +let _ = B [@warning "-53"] |