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

Parser bug ? #8320

Closed
vicuna opened this issue Oct 10, 2003 · 2 comments
Closed

Parser bug ? #8320

vicuna opened this issue Oct 10, 2003 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Oct 10, 2003

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

Bug description

Full_Name: Samuel Mimram
Version: 3.07
OS: Linux
Submission from: babasse.residence.ens-lyon.fr (140.77.128.253)

Hello,

I didn't manage to understand why the following program:

exception Toto
Callback.register_exception "toto" Toto

raises the following error when compiled with ocamlc:

File "toto.ml", line 2, characters 0-8:
Syntax error

whereas the folling one compiles perfectly well:

exception Toto;;
Callback.register_exception "toto" Toto

Thank you,

Samuel.

@vicuna
Copy link
Author

vicuna commented Oct 13, 2003

Comment author: administrator

Full_Name: Samuel Mimram

I didn't manage to understand why the following program:

exception Toto
Callback.register_exception "toto" Toto

Your program is not syntactically correct. If you want to avoid the use
of double-semicolons, you need to write:

exception Toto
let _ = Callback.register_exception "toto" Toto

Alternately, you can use ";;" instead of "let _ =".

-- Damien

@vicuna
Copy link
Author

vicuna commented Oct 13, 2003

Comment author: administrator

not a bug DD 2003-10-13

@vicuna vicuna closed this as completed Oct 13, 2003
@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