Skip to content

--strictNullChecks doesn't recongnize error that throw from nested method #9664

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

Closed
xujihui1985 opened this issue Jul 13, 2016 · 2 comments
Closed
Labels
Duplicate An existing issue was already created

Comments

@xujihui1985
Copy link

xujihui1985 commented Jul 13, 2016

TypeScript Version: 1.8.0 / nightly (2.0.0-dev.201xxxxx)
2.0.0
Code

// A *self-contained* demonstration of the problem follows...
with --strictNullChecks options, 
always complain `function lack ending return`, I throw the error in another method instead of throw it right awary. doesn't recongnize method that throw error in another method.

image

image

Expected behavior:
should compile success
Actual behavior:
can not be compiled

@RyanCavanaugh
Copy link
Member

RyanCavanaugh commented Jul 13, 2016

Same root cause (and fix) as #9655

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Jul 13, 2016
@xujihui1985
Copy link
Author

@RyanCavanaugh thanks for reply

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants