We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 719ecaf commit 4f913aaCopy full SHA for 4f913aa
crates/ty_python_semantic/src/types.rs
@@ -1349,6 +1349,10 @@ impl<'db> Type<'db> {
1349
(_, Type::NominalInstance(instance)) if instance.is_object(db) => {
1350
C::always_satisfiable(db)
1351
}
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
1356
(_, Type::ProtocolInstance(target))
1357
if Type::object(db)
1358
.satisfies_protocol(db, target, relation, visitor)
0 commit comments