# E4002

The modifier is not supported here.

## Erroneous Example

```moonbit
pub struct S {
  pub(open) field: Int
}
```

This example declares a field with the `pub(open)` visibility modifier,
which is not allowed and will give the following error on line 2:

```
The public open modifier is not supported here
```

## Suggestion

Change the visibility of the field to match the visibility of the struct:

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

We could have written `pub field: Int` instead of `field: Int` as well,
but it is not necessary, as all fields in a public struct are public
by default.
