<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/language-feature/inheritance/struct-inheritance-imported.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-06-12T14:57:42+00:00</updated>
<entry>
<title>Diagnose on use of struct inheritance. (#7419)</title>
<updated>2025-06-12T14:57:42+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-06-12T14:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4ae6e9d8b7790d827ca9edd729ad94f38a0c73de'/>
<id>urn:sha1:4ae6e9d8b7790d827ca9edd729ad94f38a0c73de</id>
<content type='text'>
* Diagnose on use of struct inheritance.

* fix test.

* Fix tests.

* fix.

---------

Co-authored-by: ArielG-NV &lt;159081215+ArielG-NV@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Support visibility control and default to `internal`. (#3380)</title>
<updated>2023-12-06T20:05:07+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2023-12-06T20:05:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=11111e5733b189127dc2c4934d67693b9bc6e764'/>
<id>urn:sha1:11111e5733b189127dc2c4934d67693b9bc6e764</id>
<content type='text'>
* Support visibility control and default to `internal`.

* Fix wip.

* Fixes.

* Fix.

* Fix test.

* Add legacy language detection and compatibility for existing code.

* Add doc.

---------

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Fix a bug in struct inheritance (#1861)</title>
<updated>2021-05-27T20:40:17+00:00</updated>
<author>
<name>T. Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2021-05-27T20:40:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=63dcc7acf4784d95407866730a70f5d37d391b88'/>
<id>urn:sha1:63dcc7acf4784d95407866730a70f5d37d391b88</id>
<content type='text'>
During lowering from AST to IR, the Slang compiler translates code that uses `struct` inheritance:

```hlsl
struct Base { int a; }
struct Derived : Base {}
```

into code where the inheritance relationship is "witnessed" by a simple field:

```hlsl
struct Base { int a; }
struct Derived { Base __anonymous_field__; }
```

The underlying bug here is that the `__anonymous_field__` that the compiler generated during IR lowering was not being given any linkage decorations (no mangled name). As a result, if multiple separately-compiled modules all access that field they could disagree on its identity as an IR instruction. This could lead to output code being generated where the declaration of `__anonymous_field__` uses one IR instruction, but accesses use another.

This change includes a fix for the issue, and a test that serves as a reproducer for the original problem.</content>
</entry>
</feed>
