E4150#
Async function call must be marked with !!
.
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.
Erroneous example#
async fn f() -> Int {
...
}
async fn g() -> Int {
f() // Error: async function call must be marked with `!!`
}
Suggestion#
Mark the async function call with !!
:
async fn g() -> Int {
f!!()
}