-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update disambiguation rules in spec #8046
Conversation
spec/Procedures.tex
Outdated
more specific argument mapping than the corresponding legal argument | ||
mapping to $F_2$, then $F_2$ is more specific. | ||
|
||
\item Similarly, if at least one argument mapping to $F_2$ is {\em more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should go back to matching the pattern of the rest of the list items - worded the same as the previous point but with F_1 and F_2 swapped.
\item If all \chpl{param} arguments prefer $F_1$ over $F_2$, then $F_1$ is more specific. In order of preference, a \chpl{param} argument prefers to be passed to (a) a \chpl{param} formal of matching type; (b) a \chpl{param} formal large enough to store the \chpl{param} value; (c) a non-\chpl{param} formal of matching type. | ||
\item If all \chpl{param} arguments prefer $F_2$ over $F_1$, then $F_2$ is more specific. | ||
|
||
\item If at least one of the legal argument mappings to $F_1$ is {\em |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to go back to a single level of specific/preferred by defining more ordered rules in the "determining more specific" section below? Having four different levels is a pretty big increase in how confusing this is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's true that it's more confusing. The additional levels are helping with cases where there are say 2 functions f1 and f2 under consideration, and each has two arguments, let's say f1a f1b and f2a f2b. The situation (that comes up a lot) is that f1a is a better match than f2a but f2b is a better match than f2a. The multiple levels help this case. Rearranging the order within the determining more specific functions / arguments can't help that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the one change requested on line 1229 I think this is good to merge.
7752327
to
a402794
Compare
This PR updates the spec to match the currently implemented disambiguation rules. This update is a follow-on to PR #7659.
Reviewed by @daviditen - thanks!