Skip to content

Commit 4f9c68a

Browse files
Update docs/source/error_code_list.rst
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent 84ccbab commit 4f9c68a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/source/error_code_list.rst

+5-3
Original file line numberDiff line numberDiff line change
@@ -1155,9 +1155,11 @@ See :ref:`overloading <function-overloading>` for more explanation.
11551155
Check for overload signatures that cannot match [overload-cannot-match]
11561156
--------------------------------------------------------------------------
11571157

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

11621164
Example:
11631165

0 commit comments

Comments
 (0)