facebook / facebook/flow

Erroneous Unaccessible Property of Two Disjoint Union Types that are Intersections of Another Type

Open
#5,353 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

I'm not sure if that title makes any sense. But I have two scenarios in a React component. Both scenarios have some shared props and one or two props that are unique to either scenario A or B. Flow warns on all three of the unique properties of A and B that they are unaccessible. See:
https://flow.org/try/#0C4TwDgpgBAygFgQwE4QCZQLxQN5QPYB2EAXFAM7BICWBA5lAL4BQokUAgpjlMAO56kK1OoygAyWIhSoW4aACEuuYHBQlylGvQbjJyNLLYBhLpwA+UeUyYBjQhSgAzPHi4AKMEjxgypIwEpSAH4hLUwAPiYASFYIPEcoT28yADoVNUwMLAByULps6KigxK8fNNUICELiQtj4kuS0-kycvNoCqM7ipLK+PEKo0jqEntTCaCzWzXyBooay8dnSAgBXABs1piA

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.