summaryrefslogtreecommitdiffstats
path: root/tests/cpu-program
diff options
context:
space:
mode:
authorkaizhangNV <149626564+kaizhangNV@users.noreply.github.com>2024-09-18 16:49:00 -0500
committerGitHub <noreply@github.com>2024-09-18 14:49:00 -0700
commit3240799c00488858afc7eeac9d1dc479609a1040 (patch)
treefb9b390a45eec1d27a717d0f1735dbff4059ac9b /tests/cpu-program
parent2d83875f4b376f047c4541a6f6c13d36e5aa228b (diff)
Lower the priority of looking up the rank of scope (#5065)
* Lower the priority of looking up the rank of scope In the previous change of #5060, we propose a way to resolve the ambiguous call when considering the scope of a function. But this rule should be considered as a low priority than "specialized candidate", aka. we should consider more "specialized candiate" first. * Count distance between reference site to declaration site Compare the candidate by calculating distance from reference site to declaration site via nearest common prefix in the scope tree. This will involve finding the common parent node of two child nodes and how sum the distance from the common parent to the two child nodes. * Change the priority higher than 'getOverloadRank' * Don't evaluate the scope rank algorithm on generic If the candidate is generic function, the function parameters won't be checked before 'CompareOverloadCandidates', so it will results in that the candidates this function could be invalid. We should not evaluate the distance algorithm in this case, instead we will evaluate later when the candidate is in flavor of Func or Expr since then all the type checks for the function will be done.
Diffstat (limited to 'tests/cpu-program')
0 files changed, 0 insertions, 0 deletions