Check source function annotations and unify managed function identity
This commit is contained in:
@@ -210,6 +210,9 @@ impl Heap {
|
||||
reference: ObjectRef,
|
||||
type_object: ObjectRef,
|
||||
) -> Result<(), VmError> {
|
||||
if self.get(reference)?.header.type_object == Some(type_object) {
|
||||
return Ok(());
|
||||
}
|
||||
if self.get(reference)?.header.type_object.is_some() {
|
||||
return Err(VmError::InvalidArgument("object already has a type"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user