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

-strict-sequence turns off "Warning 21: this statement never returns" #7297

Closed
vicuna opened this issue Jul 20, 2016 · 2 comments
Closed

-strict-sequence turns off "Warning 21: this statement never returns" #7297

vicuna opened this issue Jul 20, 2016 · 2 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Jul 20, 2016

Original bug ID: 7297
Reporter: @sliquister
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2017-09-24T15:33:16Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.03.0
Fixed in version: 4.04.0 +dev / +beta1 / +beta2
Category: typing
Monitored by: @hcarty

Bug description

Building:

let () = raise Exit; ()

should produce warning 21, but it only does when the compiler is not given -strict-sequence. The warning should be given regardless of the -strict-sequence flag.

@vicuna
Copy link
Author

vicuna commented Jul 20, 2016

Comment author: @sliquister

The typer unifies the type of the raise expression with unit, and then implements the warning. I suspect it should be the other way around.

@vicuna
Copy link
Author

vicuna commented Aug 3, 2016

Comment author: @garrigue

Fixed in 4.04 by commit 9ec4eb6.

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

2 participants