motoko
motoko copied to clipboard
typing: inference for destructured imports in actor classes fails
Inference for actor class bodies is weaker than inference for actors?
import { debugPrint } "mo:prim";
actor class () {
debugPrint("ohoh"); // produces error cannot infer type of forward variable debugPrint(M0055)
}
The error doesn't occur for an actor declaration, just an actor class.