-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Flow thinks conditional throwing leaves variables uninitialized #13
Labels
Comments
Agreed. Will fix. |
This was fixed awhile ago, sorry that we neglected to close the issue! |
jeffmo
pushed a commit
to jeffmo/flow
that referenced
this issue
Jul 31, 2015
Wrapping/unwrapping handlers properly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I have code like the following
then Flow complains that
y
(undefined) is incompatible withnumber
because it doesn't get properly initialized. If you addy = 0;
on the line after thethrow
then no errors are thrown – ideally Flow would recognize the semantics of the throw statement here and know that the return statement isn't reached in the case that an error is thrown.The text was updated successfully, but these errors were encountered: