-
Notifications
You must be signed in to change notification settings - Fork 121
Expose system capability in mixin bodies #5805
Copy link
Copy link
Open
Labels
typingInvolves the type systemInvolves the type system
Description
At the moment we don't allow code like:
mixin() {
func f<system>(){};
f<system>();
};
See test/fail/mixin-capabilities.mo.
In order to preserve the security guarantees we provide with the system capability, we should extend mixins to accept a <system> type parameter and require passing it on the include like so:
// MyMixin.mo
mixin<system>() {
func f<system>(){};
f<system>();
};
// Actor.mo
import MyMixin "MyMixin";
actor {
include MyMixin<system>();
}
(edited by @christoph-dfinity)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
typingInvolves the type systemInvolves the type system