From 4f9c68a060cff9a72b576913eaa4ed55c70329a9 Mon Sep 17 00:00:00 2001 From: Katrina Connors <32425204+katconnors@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:11:01 -0700 Subject: [PATCH] Update docs/source/error_code_list.rst Co-authored-by: Jelle Zijlstra --- docs/source/error_code_list.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/source/error_code_list.rst b/docs/source/error_code_list.rst index f5537073b8bc..e72025ec2daf 100644 --- a/docs/source/error_code_list.rst +++ b/docs/source/error_code_list.rst @@ -1155,9 +1155,11 @@ See :ref:`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: