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

Nouveau warning pour statements cassé #3913

Closed
vicuna opened this issue Dec 11, 2005 · 2 comments
Closed

Nouveau warning pour statements cassé #3913

vicuna opened this issue Dec 11, 2005 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Dec 11, 2005

Original bug ID: 3913
Reporter: @alainfrisch
Status: closed (set by @xavierleroy on 2005-12-11T10:13:44Z)
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @alainfrisch

Bug description

J'ai l'impression que la nouvelle implémentation du warning pour les statements qui n'ont pas le type unit (commit "delayed check for Statement_type too" dans le CVS) est cassée.

Si l'on compile par exemple le module Array, on obtient:

File "array.ml", line 263, characters 6-47:
Warning S: this expression should have type unit.
File "array.ml", line 264, characters 6-38:
Warning S: this expression should have type unit.

En rajoutant unit explicitement comme type de retour pour la fonction, ça passe.

@vicuna
Copy link
Author

vicuna commented Dec 11, 2005

Comment author: @alainfrisch

Je pense qu'il suffit d'ajouter dans check_application_result le cas:

| Tconstr (p, _, _) when Path.same p Predef.path_unit -> ()

@vicuna
Copy link
Author

vicuna commented Dec 11, 2005

Comment author: @xavierleroy

Retour en arriere sur ce changement, n'a pas sa place dans la branche bug-fix 3.09

@vicuna vicuna closed this as completed Dec 11, 2005
@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