# E4107

Name is declared multiple times in this for-loop.

This error occurs when the same variable name is declared multiple times in the
initialization block of a for-loop. In a for-loop's initialization, each
variable must have a unique name to avoid ambiguity about which value should be
used.

## Erroneous example

```{literalinclude} /sources/error_codes/4107_error/top.mbt
:language: moonbit
```

## Suggestion

To fix this error, you can change the variable name in the initialization block:

```{literalinclude} /sources/error_codes/4107_fixed/top.mbt
:language: moonbit
```
