Building a disjoint union fails in simple situation
Open
bug
Typing: unions/intersections
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
When building a simple object that should be the type of a disjoint union, flow gives the error that it doesn't know which case is correct, even after it should have refined the type due to the prior condition. I am confused as to why this is happening because it seems like a very simple case that I would have expected Flow to handle easily.
[Flow try](https://flow.org/try/#0C4TwDgpgBAKgFgSwHYHMoF4BQBIAPlAbx221EgC4oByAQSoBpjsBnYAJ2RQGkIRLWOqRtihQAvjnwEoZCJSoAhKuMmEZ4OdQDCyiZlmxEqGBozU6UfIuVWdmTADMArkgDGwBAHskUALYBDAGsIeE4ACllKUOMNAEooozQiUVdvVhlEhM4zA3Q882UAfjVZeigBTh4+amAIVl0oSmkDCVE2CGAnNh9gRMwxIA)
Contributor guide
Assessment
This issue has not been assessed yet.