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

=>nerver /error TS7030: Not all code paths return a value. #30065

Closed
zaoqi opened this issue Feb 23, 2019 · 3 comments
Closed

=>nerver /error TS7030: Not all code paths return a value. #30065

zaoqi opened this issue Feb 23, 2019 · 3 comments
Labels
Design Limitation Constraints of the existing architecture prevent this from being fixed

Comments

@zaoqi
Copy link

zaoqi commented Feb 23, 2019

TypeScript Version: 3.3.3333

Search Terms:

Code

Actual behavior:

// make_nerver : () => nerver
make_nerver() // Not all code paths return a value.
return make_nerver() // OK

Expected behavior:

Playground Link:

Related Issues:

@AnyhowStep
Copy link
Contributor

Kind of vague but I assume your function is supposed to return something but you made it return never and it compiled.

But you feel like never is not of type something, so it should get an error?

@DanielRosenwasser DanielRosenwasser added the Design Limitation Constraints of the existing architecture prevent this from being fixed label Feb 24, 2019
@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Feb 24, 2019

Control flow analysis doesn't look at every call in the program because it would be prohibitively expensive. See a similar issue at #8655.

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Feb 24, 2019

also in the future please post a full reproducible example of some code that exhibits the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Limitation Constraints of the existing architecture prevent this from being fixed
Projects
None yet
Development

No branches or pull requests

4 participants