-
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
Mixed refined to an array produces a read-only array, which breaks a lot of existing code. #7684
Comments
This is the same logic behind #7685. Writing to an array refined from mixed is trivially unsound, as you can see in this example:
|
I don't really know what "unsound" means, but if I have a If I'm doing I think you're sacrificing practicality and usefulness of Flow in the name of "soundness" |
See these Flow issues for explanation: - facebook/flow#7684 - facebook/flow#7685 This is a breaking change. Fixes #3.
Flow version: 0.98
https://flow.org/try/#0GYVwdgxgLglg9mABMOcAUBDAXIgggJ3wwE8AeAWxgA8BTAEwD4BKRAb0QF8AoL0SWBIgBGGfGjg5KtOi1ZdEiGMERoCRYgDoYAZzUlxTWfIXJUBgNzHuHIA
Expected behavior
Actual behavior
What was the practical rationale behind this change?
The text was updated successfully, but these errors were encountered: