E4115#
Cannot auto-fill parameter of this type.
MoonBit supports and auto-filling SourceLoc
and ArgsLoc
parameters in
functions. Leaving the default value of parameter of other types will result in
this error.
错误示例#
fn f(parameter~ : Int = _) -> Unit {
// ^~~~~~~~~ Error: Cannot auto-fill parameter of type Int
}
建议#
Use a default value for the parameter:
fn f(parameter~ : Int = 0) -> Unit {
}