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

Issue a better error message if you capture a V8 intrinsic #1423

Merged
merged 1 commit into from
May 24, 2018

Conversation

swgillespie
Copy link
Contributor

Fixes #1400.

The TypeScript compiler (correctly) rejects V8 intrinsics as being invalid identifiers, which caused us to throw an exception when trying to closure serialize a function that uses one. Instead of throwing an exception, this PR issues an error message through the usual closure serialization scheme so that users can see the full stack of functions that ultimately closed over an intrinsic.

Copy link

@lindydonna lindydonna left a comment

Choose a reason for hiding this comment

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

Assuming this prints the output you showed in the issue, this is great!

@swgillespie swgillespie merged commit 38cf2de into master May 24, 2018
@swgillespie
Copy link
Contributor Author

thanks!

@swgillespie swgillespie deleted the swgillespie/closure-intrinsic-capture branch May 24, 2018 18:54
@lindydonna lindydonna added kind/bug Some behavior is incorrect or out of spec impact/changelog labels Jun 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad error message when too much is captured
2 participants