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

type checking of raise #3240

Closed
vicuna opened this issue Mar 5, 2002 · 1 comment
Closed

type checking of raise #3240

vicuna opened this issue Mar 5, 2002 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 5, 2002

Original bug ID: 961
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Thierry Boy de la Tour
Version: 3.04, 2.04
OS: linux, solaris
Submission from: pc-atinf2.imag.fr (147.171.130.142)

Hello,

I recently forgot a semicolon in a program, and got very strange results,
and a discrepancy of behaviour between bytecode and native code. This
discrepancy seems to be due to a difference in the evaluation order of
function arguments. Here is a simple instance:

try raise Exit (print_string "no ")
with Exit ->
print_string "smoking";
print_newline ();;

you get either "smoking" or "no smoking" depending on the compiler. My opinion
however is that the type checker should reject this expression (as would be
the case with another function call). It would give the user a better chance
to add the missing semicolon.

Best regards,

Thierry

@vicuna
Copy link
Author

vicuna commented Mar 11, 2002

Comment author: administrator

Yes, raise is polymorphic.

@vicuna vicuna closed this as completed Mar 11, 2002
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant