E4020#
Package not found in the loaded packages.
Erroneous Example#
pub let a : Int = @boolean.Bool::to_int(true)
The example above tries to call the method to_int in a package boolean,
but this package is not present in the list of loaded packages,
giving the following error on line 1:
Package "boolean" not found in the loaded packages.
Suggestion#
Make sure the package name is valid.
moonbitlang/core モジュール内のパッケージでない場合は、moon.pkg のインポートパッケージにも指定されていることを確認してください。
In the above example, call the method on Bool directly:
pub let a : Int = true.to_int()