E4075#
缺少参数的类型注释。
MoonBit requires all toplevel function to have full type annotation.
错误示例#
fn f(param) -> Unit { // Error: Missing type annotation for the parameter param.
}
建议#
为参数添加类型注释:
fn f(param: Int) -> Unit {
}
或者参数应该是泛型的:
fn f[T](param: T) -> Unit {
}