Skip to content

Commit

Permalink
Update spec disambiguation details for shadowing changes (chapel-lang…
Browse files Browse the repository at this point in the history
…#23468)

This PR updates the details of disambiguation in the spec for the
changes in PR chapel-lang#22917.

Reviewed by @lydia-duncan - thanks!
  • Loading branch information
mppf authored Sep 20, 2023
2 parents 8773b74 + c94abd1 commit 65dbaf4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions doc/rst/language/spec/procedures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1394,13 +1394,17 @@ the above rules will be checked with :math:`T(A_i)` == ``int``.
Determining Most Specific Functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Given a set of candidate functions, the following steps are applied to
Given a set of candidate functions, several steps are applied to
remove candidates from the set. After the process completes, the
remaining candidates in the set are the most specific functions.

1. If any candidate is more visible (or shadows) another candidate,
discard all candidates that are less visible than (or shadowed by)
another candidate.
Before applying these steps, if there both non-operator method candidates
and non-operator non-method candidates, issue an ambiguity error without
doing further candidate selection.

1. If any non-method candidate is more visible (or shadows) another
non-method candidate, discard all non-method candidates that are less
visible than (or shadowed by) another non-method candidate.

2. If at least one candidate requires promotion and at least one
candidate does not use promotion, discard all candidates that use
Expand Down

0 comments on commit 65dbaf4

Please sign in to comment.