add note about paramspec overloads

This commit is contained in:
Douglas Creager 2025-12-15 11:19:27 -05:00
parent a914071640
commit 2614be36cc
1 changed files with 5 additions and 0 deletions

View File

@ -387,6 +387,11 @@ impl<'db> CallableSignature<'db> {
// the other callable's signature. We also need to compare the return types — for
// instance, to verify in `Callable[P, int]` that the return type is assignable to
// `int`, or in `Callable[P, T]` to bind `T` to the return type of the other callable.
//
// TODO: This logic might need to move down into `Signature`, if we need paramspecs to
// be able to match a _subset_ of an overloaded callable. (In that case, we need to
// check each signature individually, and combine together the ones that match into the
// overloaded callable that the paramspec binds to.)
match (self_is_single_paramspec, other_is_single_paramspec) {
(
Some((self_bound_typevar, self_return_type)),