E4117

目录

E4117#

Function with labelled arguments can only be applied directly.

This means you cannot pass a function with labelled arguments as an argument to another function.

错误示例#

pub fn func_takes_closure[F](f : F) -> Unit {
  ...
}

pub fn accumulate(acc~ : Int, value : Int) -> Int {
  acc + value
}

fn main {
  func_takes_closure(accumulate)
  //                 ^~~~~~~~~~
  // Error: Function with labelled arguments can only be applied directly.
}