-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
typeof s === "symbol" yields error 'unexpected predicate "symbol"' #712
Comments
Issue is here. This code isn't actually unreachable, because the string inside the |
But it shouldn't error. An es6 symbol has typeof "symbol"
|
You're right. There are two issues here: 1) we assume code is unreachable when it isn't and 2) we should properly refine symbols. |
Summary: `typeof x === "foo"` should show a warning and return false, not assert. while I was there, I also got rid of `IsP <string>` in favor of a more explicit variant. See #712 Reviewed By: bhosmer Differential Revision: D2586915 fb-gh-sync-id: 5761e3202e9849838fef940131f95fb8139cc297
And it can't be suppressed either.
It totally breaks things, not just a normal error.
The text was updated successfully, but these errors were encountered: