E4075

E4075#

Missing type annotation for the parameter.

MoonBit requires all toplevel function to have full type annotation.

Erroneous example#

fn f(param) -> Unit { // Error: Missing type annotation for the parameter param.
}

Suggestion#

Add type annotation for the parameter:

fn f(param: Int) -> Unit {
}

Or if the parameter should be generic:

fn f[T](param: T) -> Unit {
}