Skip to content

Commit b4bbde2

Browse files
committed
Set magic methods slot wrapper only for heaptypes
1 parent ade45c2 commit b4bbde2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vm/src/builtins/type.rs

+3
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ impl PyType {
301301
let mut slot_name_set = std::collections::HashSet::new();
302302

303303
for cls in self.mro.read().iter() {
304+
if !cls.slots.flags.contains(PyTypeFlags::HEAPTYPE) {
305+
continue;
306+
}
304307
for &name in cls.attributes.read().keys() {
305308
if name == identifier!(ctx, __new__) {
306309
continue;

0 commit comments

Comments
 (0)