Validate declared class fields at construction and attribute writes
This commit is contained in:
@@ -501,7 +501,8 @@ impl Vm {
|
||||
_ => Err(VmError::ObjectKindMismatch("class method")),
|
||||
})
|
||||
.collect::<Result<std::collections::BTreeMap<_, _>, _>>()?;
|
||||
self.objects.new_class(name, base, fields, methods)
|
||||
self.objects
|
||||
.new_class_with_scope(name, base, fields, methods, Some(frame.function))
|
||||
}
|
||||
|
||||
fn eval_frames(
|
||||
|
||||
Reference in New Issue
Block a user