-
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
if/typeof/in type narrowing on union type's uncommon properties #5816
Comments
Still an issue in v0.67.0 |
post code also in flow.org/try please |
It's easy to reproduce. Copy/paste into flow.org/try. Here's the link for anyone that wants it: |
Still an issue in v0.70.0 |
Not a bug. |
@vkurchatkin Have a look at the following example which uses "exact" types instead (so
|
Yes, this makes sense for exact object, but there is an issue for that already |
@vkurchatkin Are you referring to this one? #4772 |
Yes, but I think there are others |
Code
Expected behavior:
I expect the code above to work without any errors at all. I feel it's all reasonable.
Actual behavior:
I get error for all if/else branches. The only place that works is commented above.
The text was updated successfully, but these errors were encountered: