diff options
| author | Yong He <yonghe@outlook.com> | 2024-03-18 17:59:08 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-18 17:59:08 -0700 |
| commit | 2bfde345291a6f7b07865abbd0a48ec5bf4a4b61 (patch) | |
| tree | b616e9d5a5262ceb0bd6566ccdb6ec11972b81a0 /tests | |
| parent | 26e25f6e73a9808ad93c98ad34907e3a27b6726c (diff) | |
Check cyclic types after specialization. (#3791)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bugs/cyclic-type-2.slang | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/bugs/cyclic-type-2.slang b/tests/bugs/cyclic-type-2.slang new file mode 100644 index 000000000..b7e2aa448 --- /dev/null +++ b/tests/bugs/cyclic-type-2.slang @@ -0,0 +1,24 @@ + +//TEST:SIMPLE(filecheck=CHECK):-target spirv -emit-spirv-directly + +// CHECK: error 41001: + +interface IFoo {} +struct TA<T:IFoo> : IFoo +{ + TB<T> tb; +} + +struct TB<T:IFoo> +{ + TA<T> ta[2]; +} + +struct TC : IFoo {} + +[numthreads(1,1,1)] +void main() +{ + TA<TC> ta; + ta.tb.ta[0] = ta; +}
\ No newline at end of file |
