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

gestion d'un ';' bizarre #4627

Closed
vicuna opened this issue Oct 27, 2008 · 3 comments
Closed

gestion d'un ';' bizarre #4627

vicuna opened this issue Oct 27, 2008 · 3 comments

Comments

@vicuna
Copy link

vicuna commented Oct 27, 2008

Original bug ID: 4627
Reporter: @zoggy
Status: closed (set by @zoggy on 2013-08-05T09:04:45Z)
Resolution: won't fix
Priority: low
Severity: minor
Version: 3.11.0+beta
Category: ~DO NOT USE (was: OCaml general)
Related to: #6327 #6828 #6961

Bug description

A votre avis, comment ce code doit-il être parsé ?

let f x =
let y = x + 1 in
if y > 2 then
begin
prerr_endline "coucou"
end;
prerr_endline "coucou bis";
(* coucou *) ;
y

Le code est bien parsé et termine avec
Line 10, chars 4-5: Unbound value y

Au contraire, le code suivant
let f x = ignore(x) ; (* coucou *) ; x
ne parse pas, le ';' après le commentaire provoquant une erreur:
Line 1, chars 35-36: Syntax error

@vicuna
Copy link
Author

vicuna commented Oct 29, 2008

Comment author: @damiendoligez

Je suis pas super chaud pour changer la grammaire, on risque toujours l'incompatibilite.
Est-ce que ca pose vraiment un probleme en pratique ? Ca date au moins de 3.06, et
peut-etre meme de 3.00...

En tout cas ca ne sera pas fixe pour 3.11.0.

@vicuna
Copy link
Author

vicuna commented Mar 8, 2010

Comment author: @zoggy

Ne serait-ce pas simplement un problème de priorité ? J'étais tombé dessus par hasard, et une fois seulement mais ça peut perturber.

@vicuna
Copy link
Author

vicuna commented Feb 7, 2012

Comment author: @damiendoligez

This is not just a precedence problem. I have a simple fix but it breaks mldonkey, which has an instance of this syntax (probably not on purpose).

Since this is not a problem in practice, and fixing it risks breaks some existing programs, we will not fix it.

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