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

Comments

Projects
None yet
2 participants
@vicuna
Copy link

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

commented Aug 3, 2016

Comment author: @garrigue

Fixed in 4.04 by commit 9ec4eb6.

@vicuna vicuna closed this Sep 24, 2017

@vicuna vicuna added the typing label Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.