# E4065

Overloaded operator should accept the correct number of arguments.

You can refer to the [Operator Overloading](../methods.md#operator-overloading)
section for a list of operators that can be overloaded, and here is a list of
number of arguments that each operator should accept:

| Operator | Method Name | Number of Arguments |
|----------|--------------|---------------------|
| `_[_]` | `op_get` | 2 |
| `_[_] = _` | `op_set` | 3 |
| `_[_:_]` | `op_as_view` | 3 |

## Erroneous example

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

## Suggestion

Modify the method to match the expected number of arguments of the operator.

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