Add explicit managed traits and inherited method arity contracts

This commit is contained in:
2026-10-21 21:34:46 +08:00
parent b7daabdaad
commit eb60212428
16 changed files with 454 additions and 16 deletions
+8
View File
@@ -44,6 +44,14 @@ impl<'a> NativeContext<'a> {
self.store.attach_type(object, type_object)
}
pub fn implement_trait(
&mut self,
definition: ObjectRef,
capability: ObjectRef,
) -> Result<(), VmError> {
self.store.implement_trait(definition, capability)
}
pub fn store(&self) -> &ObjectStore {
self.store
}