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

If there is a path without a return, undefined should be included in the return type. #117

Closed
dimvar opened this issue Nov 25, 2014 · 1 comment · May be fixed by enterstudio/flow#21 or enterstudio/flow#22
Assignees

Comments

@dimvar
Copy link
Contributor

dimvar commented Nov 25, 2014

In this example, we should get a warning that the first operand to minus could be number or undefined.

function f(x) {
  if (x > 1) {
    return 42;
  }
}
f(0) - 123;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants