Check source function annotations and unify managed function identity

This commit is contained in:
2026-10-21 22:38:22 +08:00
parent eb60212428
commit 6346041f77
27 changed files with 568 additions and 40 deletions
+3
View File
@@ -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"));
}