E4115

E4115#

不能自动填充此类型的参数。

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 {
}