Update comment

This commit is contained in:
David Peter 2025-12-10 11:10:54 +01:00
parent 0d9429cc64
commit ece01a1cb6
1 changed files with 4 additions and 4 deletions

View File

@ -2710,10 +2710,10 @@ impl<'db> Type<'db> {
})
.unwrap_or_else(|| ConstraintSet::from(relation.is_assignability())),
// Similarly, `Literal[<class 'C'>]` is assignable to `C[...]` (a generic-alias type)
// if the default specialization of `C` is assignable to `C[...]`. This scenario
// occurs with final generic types, where `type[C[...]]` is simplified to the
// generic-alias type `C[...]`, due to the fact that `C[...]` has no subclasses.
// Similarly, `<class 'C'>` is assignable to `<class 'C[...]'>` (a generic-alias type)
// if the default specialization of `C` is assignable to `C[...]`. This scenario occurs
// with final generic types, where `type[C[...]]` is simplified to the generic-alias
// type `<class 'C[...]'>`, due to the fact that `C[...]` has no subclasses.
(Type::ClassLiteral(class), Type::GenericAlias(target_alias)) => {
class.default_specialization(db).has_relation_to_impl(
db,