E4075

E4075#

Missing type annotation for the parameter.

MoonBit requires all toplevel function to have full type annotation.

错误示例#

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

建议#

Add type annotation for the parameter:

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

Or if the parameter should be generic:

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