E4085

E4085#

给定标签没有参数。

This error happens when:

  • You made a typo in the label name;

  • You mistakenly treat a positional argument as a labelled argument.

  • You provided extra labelled arguments to the function.

错误示例:#

pub fn f(name : String) -> Unit {
  println("Hello, \{name}")
}

fn main {
  f("John", age=20) // Error: This function has no parameter with label age~.
}

建议#

Check the signature of the function and provide the correct label name or remove the extra labelled argument.

pub fn f(name : String) -> Unit {
  println("Hello, \{name}")
}

fn main {
  f("John")
}