# E4200

Compiler diagnostic name: `struct_constr_incorrect_return_type`.

A struct constructor must return the struct type itself. If the constructor
signature returns another type, the declaration cannot be used as that struct's
constructor.

## Erroneous example

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

## Suggestion

Make the constructor return the struct type and implement the matching
`Type::new` method.

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