E3005

E3005#

There is no such visibility for the entity (function, type, trait, and so on).

Usually, this means that you put a priv visibility modifier on an entity that is private by default.

See the Access Control section for a detailed explanation on the visibility in MoonBit.

Erroneous example#

///|
priv let value = 3 // Error: No 'priv' visibility for value.

Suggestion#

Remove the visibility modifier from the definition of the entity:

///|
let value = 3 // This is already `priv` by default.

///|
test {
  inspect(value, content="3")
}