Skip to content

Commit 4f913aa

Browse files
committed
add commnet
1 parent 719ecaf commit 4f913aa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/ty_python_semantic/src/types.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,10 @@ impl<'db> Type<'db> {
13491349
(_, Type::NominalInstance(instance)) if instance.is_object(db) => {
13501350
C::always_satisfiable(db)
13511351
}
1352+
1353+
// Any structural types that are "supertypes of `object`"
1354+
// are in fact equivalent to `object`, and should therefore
1355+
// be treated equivalently to `object` when it comes to assignability/subtyping
13521356
(_, Type::ProtocolInstance(target))
13531357
if Type::object(db)
13541358
.satisfies_protocol(db, target, relation, visitor)

0 commit comments

Comments
 (0)