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

Fix crash in async functions when targetting ES5. #9397

Merged

Conversation

sandersn
Copy link
Member

Fixes #9320

When targetting ES5 and with --noImplicitReturns, an async function whose return type could not be determined would cause a compiler crash.

When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
@sandersn
Copy link
Member Author

@ahejlsberg do you want to take a look? This fix is pretty ad-hoc. But it's also only occurring when stacking a couple of wrong things on top of each other (It targets ES5 and references 'window' which doesn't exist)

@ahejlsberg
Copy link
Member

👍

@sandersn sandersn merged commit 7b77f6b into master Jun 30, 2016
@sandersn sandersn deleted the fix-crash-in-async-and-no-implicit-returns-targeting-es5 branch June 30, 2016 01:40
@texastoland
Copy link
Contributor

texastoland commented Jun 30, 2016

But it's also only occurring when stacking a couple of wrong things on top of each other (It targets ES5 and references window which doesn't exist)

I was just trying to provide the most streamlined case possible. I'll test in the next nightly!

@sandersn
Copy link
Member Author

Not a problem. I'm not sure why it didn't crash when targeting ES6 or when I substituted this for window. (Well, in the latter case, I think it was able to get a proper Promise<void> type.)

@texastoland
Copy link
Contributor

In any case thanks for the patch 👏

@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.

4 participants