Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failwith should warn when called with more than one argument #8214

Closed
vicuna opened this issue Jul 22, 2003 · 1 comment
Closed

failwith should warn when called with more than one argument #8214

vicuna opened this issue Jul 22, 2003 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Jul 22, 2003

Original bug ID: 1762
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Hi,

failwith sometimes leads to strange behavior... I found this bug in a
program:

if cond then failwith "ABORTED" (* semicolon forgotten *)
Printf.printf "OK\n";
Printf.printf "NEXT\n";

When run, displays only "NEXT". Worse, this "false" program works
"perfectly well":

if cond then failwith "ABORTED" 4 List.map 0;
Printf.printf "NEXT\n";

Sébastien Furic.

@vicuna
Copy link
Author

vicuna commented Feb 2, 2005

Comment author: administrator

There is a new warning for "black holes" in 3.09 (Jacques)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant