ocaml/testsuite/tests/typing-warnings/pr7297.ml

20 lines
408 B
OCaml
Raw Normal View History

(* TEST
flags = " -w A -strict-sequence "
2018-08-10 05:22:18 -07:00
* expect
*)
(* Ignore OCAMLRUNPARAM=b to be reproducible *)
Printexc.record_backtrace false;;
2018-08-10 05:22:18 -07:00
[%%expect {|
- : unit = ()
|}]
2016-08-02 17:03:43 -07:00
let () = raise Exit; () ;; (* warn *)
2018-08-10 05:22:18 -07:00
[%%expect {|
Line 1, characters 9-19:
let () = raise Exit; () ;; (* warn *)
^^^^^^^^^^
Warning 21: this statement never returns (or has an unsound type.)
Exception: Stdlib.Exit.
2018-08-10 05:22:18 -07:00
|}]