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.
Erroneous example#
fn f(parameter~ : Int = _) -> Unit {
// ^~~~~~~~~ Error: Cannot auto-fill parameter of type Int
}
Suggestion#
Use a default value for the parameter:
fn f(parameter~ : Int = 0) -> Unit {
}