Skip to content

Commit

Permalink
Update docs/source/error_code_list.rst
Browse files Browse the repository at this point in the history
Co-authored-by: Jelle Zijlstra <[email protected]>
  • Loading branch information
katconnors and JelleZijlstra committed Sep 13, 2024
1 parent 84ccbab commit 4f9c68a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/source/error_code_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1155,9 +1155,11 @@ See :ref:`overloading <function-overloading>` for more explanation.
Check for overload signatures that cannot match [overload-cannot-match]
--------------------------------------------------------------------------

In the case of an overloaded function, if one of the signatures is never accessible, this error may occur.
An example where this can occur is with the utilization of object and int types.
Consider swapping the declaration of the two types so that the narrower signature is declared before the broader signature.
Warn if an ``@overload`` variant can never be matched, because an earlier
overload has a wider signature. For example, this can happen if the two
overloads accept the same parameters and each parameter on the first overload
has the same type or a wider type than the corresponding parameter on the second
overload.

Example:

Expand Down

0 comments on commit 4f9c68a

Please sign in to comment.