<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/bugs/overload-ambiguous-2.slang, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2025-02-05T18:37:03+00:00</updated>
<entry>
<title>Feature/initialize list side branch (#6058)</title>
<updated>2025-02-05T18:37:03+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2025-02-05T18:37:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9ec6b91686b651d959fd9ffbec283845bd725dd6'/>
<id>urn:sha1:9ec6b91686b651d959fd9ffbec283845bd725dd6</id>
<content type='text'>
* SP004: implement initialize list translation to ctor

- We synthesize a member-wise constructor for each struct follow
   the rules described in SP004.
- Add logic to translate the initialize list to constructor invoke
- Add cuda-host decoration for the synthesized constructor
- Remove the default constructor when we have a valid member init constructor
- Disable -zero-initialize option, will re-implement it in followup (#6109).
- Fix the overload lookup issue
    When creating invoke expression for ctor, we need to call
    ResolveInvoke() to find us the best candidates, however
    the existing lookup logic could find us the base constructor
    for child struct, we should eliminate this case by providing
    the LookupOptions::IgnoreInheritance to lookup, this requires
    us to create a subcontext on SemanticsVisitor to indicate that
    we only want to use this option on looking the constructor.
- Do not implicit initialize a struct that doesn't have explicit default
   constructor.

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Lower the priority of looking up the rank of scope (#5065)</title>
<updated>2024-09-18T21:49:00+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2024-09-18T21:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=3240799c00488858afc7eeac9d1dc479609a1040'/>
<id>urn:sha1:3240799c00488858afc7eeac9d1dc479609a1040</id>
<content type='text'>
* 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.</content>
</entry>
</feed>
