We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor hindrance worth mentioning. Not something that we can't get around.
module { public let default_id = Principal.fromText("lxzze-o7777-77777-aaaaa-cai");
results in non-static expression in library or moduleMotoko(M0014)
There is no way to put a principal inside a module's static variables
Perhaps something like this would work, similar to how Blob works
module { public let default_id = "lxzze-o7777-77777-aaaaa-cai":Principal
The text was updated successfully, but these errors were encountered:
Yeah, that's annoying. You could declare a constant function instead.
Sorry, something went wrong.
What about let default_actor : actor {} = actor "lxzze-o7777-77777-aaaaa-cai"; and then turn that into a Principal at the usage site?
let default_actor : actor {} = actor "lxzze-o7777-77777-aaaaa-cai";
Principal
nice, both options work better than what I tried - putting opt and later trapping if it's not there
@crusso maybe we can mark certain functions/prims as static-preserving, and as such extend the set of allowed values in modules?
No branches or pull requests
Minor hindrance worth mentioning. Not something that we can't get around.
results in
non-static expression in library or moduleMotoko(M0014)
There is no way to put a principal inside a module's static variables
Perhaps something like this would work, similar to how Blob works
The text was updated successfully, but these errors were encountered: