@@ -2637,24 +2637,27 @@ impl<'db> Type<'db> {
26372637 _ => {
26382638 KnownClass :: MethodType
26392639 . to_instance ( db)
2640- . member ( db, & name)
2640+ . member_lookup_with_policy ( db, name. clone ( ) , policy )
26412641 . or_fall_back_to ( db, || {
26422642 // If an attribute is not available on the bound method object,
26432643 // it will be looked up on the underlying function object:
2644- Type :: FunctionLiteral ( bound_method. function ( db) ) . member ( db, & name)
2644+ Type :: FunctionLiteral ( bound_method. function ( db) )
2645+ . member_lookup_with_policy ( db, name, policy)
26452646 } )
26462647 }
26472648 } ,
26482649 Type :: MethodWrapper ( _) => KnownClass :: MethodWrapperType
26492650 . to_instance ( db)
2650- . member ( db, & name) ,
2651+ . member_lookup_with_policy ( db, name, policy ) ,
26512652 Type :: WrapperDescriptor ( _) => KnownClass :: WrapperDescriptorType
26522653 . to_instance ( db)
2653- . member ( db, & name) ,
2654- Type :: DataclassDecorator ( _) => {
2655- KnownClass :: FunctionType . to_instance ( db) . member ( db, & name)
2656- }
2657- Type :: Callable ( _) => KnownClass :: Object . to_instance ( db) . member ( db, & name) ,
2654+ . member_lookup_with_policy ( db, name, policy) ,
2655+ Type :: DataclassDecorator ( _) => KnownClass :: FunctionType
2656+ . to_instance ( db)
2657+ . member_lookup_with_policy ( db, name, policy) ,
2658+ Type :: Callable ( _) => KnownClass :: Object
2659+ . to_instance ( db)
2660+ . member_lookup_with_policy ( db, name, policy) ,
26582661
26592662 Type :: Instance ( InstanceType { class } )
26602663 if matches ! ( name. as_str( ) , "major" | "minor" )
0 commit comments