how the read-write analysis works for loops
Open
question
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the issue:
When slither generates IFLOOP node, it has every read and write from its body.
### Code example to reproduce the issue:
```solidity
contract A {
function foo() public pure {
int i = 4;
while (i < 4) {
i++;
}
}
```
```python
>>> from slither import Slither
>>> foo = Slither('a.sol').contracts[0].functions[0]
>>> print(foo.nodes[3])
IF_LOOP i < 4
>>> print(foo.nodes[3].variables_written[0])
i
```
### Version:
0.9.3
### Relevant log output:
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.