E4150

E4150#

调用异步函数时,必须用 ! 操作符来标记这是一次异步函数调用:

MoonBit require all async function calls to be marked with !, as a way to to inform the programmer that the function call is async and the control flow will be suspended here.

错误示例#

async fn f() -> Int {
  ...
}

async fn g() -> Int {
  f() // Error: async function call must be marked with `!`
}

建议#

调用异步函数时,必须用 ! 操作符来标记这是一次异步函数调用:

async fn g() -> Int {
  f!()
}