Skip to content

do not report 'noImplicitReturns' error if inferred return type of th… - #5824

Merged
Vladimir Matveev (vladima) merged 3 commits into
masterfrom
implicitReturnInferredVoid
Dec 1, 2015
Merged

do not report 'noImplicitReturns' error if inferred return type of th…#5824
Vladimir Matveev (vladima) merged 3 commits into
masterfrom
implicitReturnInferredVoid

Conversation

@vladima

Copy link
Copy Markdown
Contributor

…e function is void/any. fixes #5814

Comment thread src/compiler/checker.ts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove "explicitly specified"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'explicitly specified' reflects what is checked in the if below - if function has explicit type annotation and it is void / any

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the second "with"

@vladima

Copy link
Copy Markdown
Contributor Author

Daniel Rosenwasser (@DanielRosenwasser) any other comments?

Comment thread src/compiler/checker.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return or throw

@sandersn

Copy link
Copy Markdown
Member

👍

@yuit

Copy link
Copy Markdown
Contributor

👍

@DanielRosenwasser

Copy link
Copy Markdown
Member

Apart from Yui (@yuit)'s feedback 👍

Vladimir Matveev (vladima) added a commit that referenced this pull request Dec 1, 2015
do not report 'noImplicitReturns' error if inferred return type of th…
@vladima
Vladimir Matveev (vladima) merged commit b40079e into master Dec 1, 2015
@vladima
Vladimir Matveev (vladima) deleted the implicitReturnInferredVoid branch December 1, 2015 04:36
@microsoft 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

noImplicitReturns compile error for void functions as of 1.8.0-dev.20151126

5 participants