# E4194

Compiler diagnostic name: `unsupported_declaration`.

Unsupported declaration target.

The declaration-only attribute is supported only on declaration items that the
compiler can later match with an implementation. It cannot be applied to
ordinary value bindings or other unsupported top-level items.

## Erroneous example

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

`answer` is a `let` binding, not a function, type, or implementation relation
that can be tracked as a declaration.

## Suggestion

Use an ordinary definition for values. If you need a declaration, declare a
function signature, abstract type, or implementation relation.

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