Skip to content

Commit eebf133

Browse files
committed
Set magic methods slot wrapper only for heaptypes
1 parent e5bf72e commit eebf133

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vm/src/builtins/type.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ impl PyType {
280280
let mut slot_name_set = std::collections::HashSet::new();
281281

282282
for cls in self.mro.iter() {
283+
if !cls.slots.flags.contains(PyTypeFlags::HEAPTYPE) {
284+
continue;
285+
}
283286
for &name in cls.attributes.read().keys() {
284287
if name == identifier!(ctx, __new__) {
285288
continue;

0 commit comments

Comments
 (0)