-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Original bug ID: 3959
Reporter: @mjambon
Assigned to: @gasche
Status: assigned (set by @damiendoligez on 2017-02-27T13:56:11Z)
Resolution: open
Priority: normal
Severity: minor
Version: 3.09.0
Category: toplevel
Bug description
The ocaml command or a custom toplevel, when used in non-interactive mode, does not stop when it encounters a directive with a valid name but an invalid argument:
- Valid directive name, wrong argument (should exit):
[droopy] ~/tmp % cat blop.ml
#use "abc";;
print_endline "hello";;
[droopy] ~/tmp % ocaml blop.ml && echo success
Cannot find file abc.
hello
success
- Wrong directive name (works as expected):
[droopy] ~/tmp % cat blop2.ml
#abcde "abc";;
print_endline "hello";;
[droopy] ~/tmp % ocaml blop2.ml && echo success
Unknown directive `abcde'.
Additional information
This problem is present at least in OCaml 3.08.4 and OCaml 3.09.1 (x86 Linux).
Reactions are currently unavailable