# E3012

Struct pattern and map pattern cannot be mixed. The key in map pattern must be a
literal, while the key in struct pattern must be the field name.

## Erroneous example

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

## Suggestion

Remove either the map pattern part or the struct pattern part from the pattern.

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

Or,

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