E4037#
Compiler diagnostic name: pkg_not_imported.
Cannot perform action: package is not imported.
Some language features require an explicit package import because the compiler
needs runtime support from that package. For example, async fn main and
async test require moonbitlang/async.
Erroneous example#
async fn main {
//^~~~~
// Error: Cannot use `async fn main`: package moonbitlang/async is not imported.
()
}
Suggestion#
Import the required package if you intend to use the feature. If you do not need the feature, remove the construct that requires the package.
fn main {
()
}