@@ -15,10 +15,11 @@ use super::pystr::PyStrRef;
15
15
use super :: staticmethod:: PyStaticMethod ;
16
16
use super :: tuple:: PyTuple ;
17
17
use super :: weakref:: PyWeak ;
18
+ use crate :: builtins:: tuple:: PyTupleTyped ;
18
19
use crate :: function:: { FuncArgs , KwArgs } ;
19
20
use crate :: pyobject:: {
20
- BorrowValue , Either , IdProtocol , PyAttributes , PyClassImpl , PyContext , PyIterable , PyLease ,
21
- PyObjectRef , PyRef , PyResult , PyValue , TryFromObject , TypeProtocol ,
21
+ BorrowValue , Either , IdProtocol , PyAttributes , PyClassImpl , PyContext , PyLease , PyObjectRef ,
22
+ PyRef , PyResult , PyValue , TryFromObject , TypeProtocol ,
22
23
} ;
23
24
use crate :: slots:: { self , Callable , PyTpFlags , PyTypeSlots , SlotGetattro } ;
24
25
use crate :: vm:: VirtualMachine ;
@@ -417,10 +418,10 @@ impl PyType {
417
418
} ) ) ;
418
419
}
419
420
420
- let ( name, bases, dict, kwargs) : ( PyStrRef , PyIterable < PyTypeRef > , PyDictRef , KwArgs ) =
421
+ let ( name, bases, dict, kwargs) : ( PyStrRef , PyTupleTyped < PyTypeRef > , PyDictRef , KwArgs ) =
421
422
args. clone ( ) . bind ( vm) ?;
422
423
423
- let bases: Vec < PyTypeRef > = bases. iter ( vm ) ? . collect :: < Result < Vec < _ > , _ > > ( ) ? ;
424
+ let bases = bases. borrow_value ( ) . to_vec ( ) ;
424
425
let ( metatype, base, bases) = if bases. is_empty ( ) {
425
426
let base = vm. ctx . types . object_type . clone ( ) ;
426
427
( metatype, base. clone ( ) , vec ! [ base] )
0 commit comments