<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/language-feature/generics, 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-10-16T18:23:13+00:00</updated>
<entry>
<title>Fix use of variadic generics with [Differentiable]. (#8736)</title>
<updated>2025-10-16T18:23:13+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-10-16T18:23:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=bedc3421c9e1e0837fa69e30396a27a60f0fee53'/>
<id>urn:sha1:bedc3421c9e1e0837fa69e30396a27a60f0fee53</id>
<content type='text'>
There was a bug that causes the compiler failing to treat a `no_diff
TypePack` as a type pack, and thus diagnose an error when resolving the
following call.

The fix is to unwrap any ModifiedType wrappers in `IsTypePack()` check.</content>
</entry>
<entry>
<title>canonical type equality constraint (#8445)</title>
<updated>2025-09-30T06:22:50+00:00</updated>
<author>
<name>Ronan</name>
<email>ro.cailleau@gmail.com</email>
</author>
<published>2025-09-30T06:22:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ee5adb87050ae7c0b96056a67dddc5d48174e695'/>
<id>urn:sha1:ee5adb87050ae7c0b96056a67dddc5d48174e695</id>
<content type='text'>
Fixes #8439

When checked, generic type equality constraints types are now in a
canonical order, allowing for a commutative type equality operator.

---------

Co-authored-by: Mukund Keshava &lt;mkeshava@nvidia.com&gt;</content>
</entry>
<entry>
<title>render-test: Change D3D12 default to sm_6_5 (#8320)</title>
<updated>2025-09-02T23:43:48+00:00</updated>
<author>
<name>James Helferty (NVIDIA)</name>
<email>jhelferty@nvidia.com</email>
</author>
<published>2025-09-02T23:43:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f02b08490aa905f42a8d90381db84b1f8e409c0c'/>
<id>urn:sha1:f02b08490aa905f42a8d90381db84b1f8e409c0c</id>
<content type='text'>
Changes default for render-test to sm_6_5.
Since sm_6_5 is the new default, remove the -use-dxil option, add
-use-dxcb option
Remove -use-dxil option from all test cases.
Add -use-dxcb to two tests that needed it.

Fixes #7611</content>
</entry>
<entry>
<title>Fix for Generic Function Redefinition Error (#7891)</title>
<updated>2025-07-25T17:56:50+00:00</updated>
<author>
<name>Gangzheng Tong</name>
<email>tonggangzheng@gmail.com</email>
</author>
<published>2025-07-25T17:56:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c0726e1d571f7f319a244ee6a6ba1ed2c361e079'/>
<id>urn:sha1:c0726e1d571f7f319a244ee6a6ba1ed2c361e079</id>
<content type='text'>
* emit literal values in getTypeNameHint for bool, str etc.

* add test for specializing generics with bool literals

* fix build error

* add specializing with Enum type test</content>
</entry>
<entry>
<title>Minimal optional constraints (#7422)</title>
<updated>2025-06-28T02:39:24+00:00</updated>
<author>
<name>Julius Ikkala</name>
<email>julius.ikkala@gmail.com</email>
</author>
<published>2025-06-28T02:39:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7349dc5cff49cf22c82eb912813e47f30cd7a757'/>
<id>urn:sha1:7349dc5cff49cf22c82eb912813e47f30cd7a757</id>
<content type='text'>
* Parse optional witness syntax

* Allow failing optional constraint

* Make `is` work with optional constraint

* Allow using optional constraint in checked if statements

* Fix tests

* Make it work with structs

* Fix MSVC build error

* Disallow using `as` with optional constraints

* Update test to match split is/as errors

* Add tests

* Fix uninitialized variables in tests

* Add tests of incorrect uses &amp; fix related bugs

* Mention optional constraints in docs

* format code

* Fix type unification with NoneWitness

* Fix formatting

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;
Co-authored-by: Nathan V. Morrical &lt;natemorrical@gmail.com&gt;</content>
</entry>
<entry>
<title>Do not print errors in _coerce when "JustTrying". (#7064)</title>
<updated>2025-05-15T01:55:17+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-05-15T01:55:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=2275e18fc052239fe67f3fda68252ad92bb83ca9'/>
<id>urn:sha1:2275e18fc052239fe67f3fda68252ad92bb83ca9</id>
<content type='text'>
* Do not print errors in _coerce when "JustTrying".

While figuring out which generic-overload works best, `_coerce()` is
printing errors and Slang compilation terminates prematurely.

When `TryCheckGenericOverloadCandidateTypes()` is calling `_coerce()` in
"JustTrying" mode, the error messages should be snoozed.

The following logic shows the intention of how to silence the error
messages, but the chain of `sink` was broken in the middle and
`_coerce()` was using `getSink()` from the SemanticVisitor.

 val = ExtractGenericArgInteger(
   arg,
   getType(m_astBuilder, valParamRef),
   context.mode == OverloadResolveContext::Mode::JustTrying ? nullptr : getSink());

* Use tempSink when available.</content>
</entry>
<entry>
<title>Added getCanonicalGenericConstraints2 (sorts constraints and allows more generic expressions) (#6787)</title>
<updated>2025-04-26T19:04:01+00:00</updated>
<author>
<name>Ronan</name>
<email>ro.cailleau@gmail.com</email>
</author>
<published>2025-04-26T19:04:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a5efbb1b775afb2f6b29b37d39947c41744bb005'/>
<id>urn:sha1:a5efbb1b775afb2f6b29b37d39947c41744bb005</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed generic interface specialization crashes (#6601): (#6688)</title>
<updated>2025-04-03T04:17:15+00:00</updated>
<author>
<name>Ronan</name>
<email>ro.cailleau@gmail.com</email>
</author>
<published>2025-04-03T04:17:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6b44630afe4ff180ba608142e9515abcd369775e'/>
<id>urn:sha1:6b44630afe4ff180ba608142e9515abcd369775e</id>
<content type='text'>
* Fixed generic interface specialization crashes:

- Add an export decoration to specialized generic interfaces.

* Fixed generic interface specialization crashes:

- Add an export decoration to specialized generic interfaces.
- Use getTypeNameHint(...) instead of a manual mangler.

* In cloneInstDecorationsAndChildren: specialize all linkage decorations, not just the exports.

- If a linkage decoration is already present, it is not specialized and replaced by the specialized one.
- If a specialization uses the TypeNameHint, sanitize it to be used as an identifier.
- Use the identifier name sanitizer from slang-mangle.

* Added tests/generics/generic-interface-linkage.slang

- See #6601 and #6688</content>
</entry>
<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>Fix circularity issue when checking multiple generic interface constraints. (#6121)</title>
<updated>2025-01-17T22:53:02+00:00</updated>
<author>
<name>Sai Praveen Bangaru</name>
<email>31557731+saipraveenb25@users.noreply.github.com</email>
</author>
<published>2025-01-17T22:53:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9d99976703872d7608415da5a90d070bd5dec5b7'/>
<id>urn:sha1:9d99976703872d7608415da5a90d070bd5dec5b7</id>
<content type='text'>
* Fix circularity issue with checking multiple generic interface constraints

* Create multi-generic-interface-constraint.slang

* Update multi-generic-interface-constraint.slang

* Update slang-check-inheritance.cpp

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
</feed>
