Exact object shapes lost after refinement
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
When inspecting [this repro](https://flow.org/try/#0PTAEAEDMBsHsHcBQiCmAPADrATgF1LgJ4YqgAKArgM4AWoAvKAN4A+iAkESQFygDkGajT4AaRCwC+ydFjwFipAEooqWAHZVSjVhy4pefbCvWbRHIwEcKK3AH0AlgBNeVXNntqA5mMnTMOfD1yIWVVWA0tZjZOBQNBWjN2S2tXB2dQV3cvHylUfzkggGVYAGMAaxRcAFkVKgBDT0jKWlAWUFCTUjbmmg7wzWQS-vwaOrVHaBQehlB4unoAPmYpUFW1xCGNEbGJlD6ImaMwg8XQTapYSYA6OE8ACiPOq+SbNIBKQeHQUfHJmqp6o0ZncALa1Br6UDFcqVf6AlBvBhLJgceyQUCg8GNK5Beh4-iPfooPiIlFrNbsH67faaTEAiEfclJSoUbBqRDklagDmgdhojFg+nYl6pJygACE+Io4xQkA8KEcpJ5TKpkxpKDp8MZFKMuFZ7M5yvJ3MpO0mPU1DMQEiAA)'s "bottom gutter" we can see that:
- on the 23th line it has a type of `{|type: 'push'|} | {|request_id: string, type: 'response'|} | {|request_id: string, type: 'push'|}` - all have exact shapes
- in the refined block on the 25th line the exactness seems to be lost and the inspected type is `{request_id: string, type: 'response'}`
- AFTER the refining if statement, so basically in other case on the 29th line it stays inexact - `{type: 'push'} | {request_id: string, type: 'push'}`
Contributor guide
Assessment
This issue has not been assessed yet.