Refinement should be lost after function call in loop
Ouverte
bug
Typing: refinements
- Langage dominant
- Rust
- Étoiles
- 22.3k
- Forks
- 1.9k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
This code is wrong but Flow 0.37 gives no errors:
```js
/* @flow */
var x : {y : ?Function} = {
y: function() {
x.y = null;
},
};
if (x.y) {
for (const a of [1, 2, 3]) {
x.y();
}
}
```
https://flowtype.org/try/#0PQKgBAAgZgNg9gdzCYAoVA3AhgJzADzAC4wBvAT2LAH4AxAVwDsBjAFwEs5GBfMAXjKowYciShM2nRgAoAlIOHD8AOkoDG9GDADcQsNwA0qbrtTsoYaSvLzSeqHDzTmXAM6swWMHAsBtAIwGYABMQQDMALq2ekqqcrrC3MaoQA
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.