fix(builtins): should not appear in public value

This commit is contained in:
2025-05-20 10:00:50 +08:00
parent d0298ce2a6
commit 96fb6033a4
2 changed files with 6 additions and 11 deletions

View File

@@ -42,7 +42,10 @@ impl<'jit: 'vm, 'vm> AttrSet<'jit, 'vm> {
}
pub fn select(&self, sym: usize) -> Option<Value<'jit, 'vm>> {
self.data.get(&sym).cloned()
self.data.get(&sym).cloned().map(|val| match val {
Value::Builtins(x) => Value::AttrSet(x.upgrade().unwrap()),
val => val
})
}
pub fn has_attr(&self, sym: usize) -> bool {