# E3018

Bounds of range pattern must be constant, named constant or wildcard.

## Erroneous example

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

## Suggestion

You can either lift the variable `a` to a named constant:

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

Or, you can use the constant value directly:

```{literalinclude} /sources/error_codes/3018_fixed/top_1.mbt
:language: moonbit
```

Or, you can use a wildcard:

```{literalinclude} /sources/error_codes/3018_fixed/top_2.mbt
:language: moonbit
```

Notice, using wildcard alters the meaning of this range pattern.
