Add explicit managed traits and inherited method arity contracts
This commit is contained in:
@@ -77,6 +77,16 @@ impl ObjectStore {
|
||||
"replace immutable type definition",
|
||||
));
|
||||
}
|
||||
if self
|
||||
.object(reference)?
|
||||
.payload()
|
||||
.as_any()
|
||||
.is::<crate::EndorTraitObject>()
|
||||
{
|
||||
return Err(VmError::UnsupportedOperation(
|
||||
"replace immutable trait definition",
|
||||
));
|
||||
}
|
||||
self.validate_builtin(&payload)?;
|
||||
self.heap.replace_payload(reference, payload)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user