E4076#
Missing type annotation for the return value.
MoonBit requires all toplevel function to have full type annotation. It is a
common mistake for people to forget to include the return type of a function,
especially when the function returns Unit
.
Erroneous example#
fn f() { // Error: Missing type annotation for the return value.
}
Suggestion#
Add the return type of the function:
fn f() -> Unit {
}