<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/compute/assoctype-nested.slang.expected.txt, 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>2019-02-05T21:55:17+00:00</updated>
<entry>
<title>Fix checking of interface conformances for nested types</title>
<updated>2019-02-05T21:55:17+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoley@nvidia.com</email>
</author>
<published>2019-02-05T19:53:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=43950e2b2f2b1109fe25e67fc678272af6dfb7ef'/>
<id>urn:sha1:43950e2b2f2b1109fe25e67fc678272af6dfb7ef</id>
<content type='text'>
Before this change, code like the following would crash the compiler:

```hlsl
interface IThing { /* ... */ }
struct Outer
{
    struct Inner : IThing
    {}
}
/* go on to use Outer.Inner */
```

The problem was that the front-end logic for checking interface conformances was *only* checking declarations at the top level of a module, or nested under a generic.
This change fixes the logic to recurse through the entire tree of declarations.
I have added a test case that uses a nested `struct` type to satisfy an associated type requirement, to confirm that the new check works as intended.
</content>
</entry>
</feed>
