diff options
| author | Tim Foley <tfoley@nvidia.com> | 2019-02-05 11:53:27 -0800 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2019-02-05 13:55:17 -0800 |
| commit | 43950e2b2f2b1109fe25e67fc678272af6dfb7ef (patch) | |
| tree | 0863941f34088e09e2e28b934df54388ca294b82 /source/slang/parser.cpp | |
| parent | 314795b5d8ff5845624f93e152face325659dd0c (diff) | |
Fix checking of interface conformances for nested types
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.
Diffstat (limited to 'source/slang/parser.cpp')
0 files changed, 0 insertions, 0 deletions
