[ty] Enforce that an attribute on a class X must be callable in order to satisfy a member on a protocol P (#20142)
## Summary Small, incremental progress towards checking the types of method members. ## Test Plan Added an mdtest
This commit is contained in:
@@ -560,7 +560,8 @@ impl<'a, 'db> ProtocolMember<'a, 'db> {
|
||||
db,
|
||||
matches!(
|
||||
other.to_meta_type(db).member(db, self.name).place,
|
||||
Place::Type(_, Boundness::Bound)
|
||||
Place::Type(ty, Boundness::Bound)
|
||||
if ty.is_assignable_to(db, CallableType::single(db, Signature::dynamic(Type::any())))
|
||||
),
|
||||
),
|
||||
// TODO: consider the types of the attribute on `other` for property members
|
||||
|
||||
Reference in New Issue
Block a user