When trying to compile by dfx deploy A
actor B {
}
I get
/home/porton/t/test-dfx/src/B.mo:1.1-2.2: type error [M0014], non-static expression in library or module
Why doesn’t this sample compile? Workaround:
actor class B() {
}
Here is A.mo
:
import Cycles "mo:base/ExperimentalCycles";
import B "./B";
actor class A() {
public shared func init(): async () {
Cycles.add(1000_000_000_000);
// ignore await B.B();
}
}