# E4199

Compiler diagnostic name: `struct_has_no_constr`.

The call syntax `Type(...)` is available only for structs that declare a
constructor. A regular record-style struct can still be created with a record
literal, but it does not automatically get a constructor function with the
struct name.

## Erroneous example

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

## Suggestion

Use record construction, or declare and implement a constructor before calling
the struct as a function.

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