E4020#
未在加载的包中找到包。
错误示例:#
let a = @boolean.to_int(true)
上述例子中,试图在包 boolean 中调用方法 to_int,但这个包不在加载的包列表中,会在第 1 行报错:
Package "boolean" not found in the loaded packages.
建议#
确保包名是合法的。
如果它不是 moonbitlang/core 的包,请确保它也在 moon.pkg.json 中作为导入包之一被声明。
In the above example, the package name should be @bool instead of @boolean:
let a = @bool.to_int(true)