diff options
| author | Yong He <yonghe@outlook.com> | 2024-03-21 15:45:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-21 15:45:27 -0700 |
| commit | dd32414bd7332c55dc37ea2972ffcca73328d834 (patch) | |
| tree | 7bcca5ab90c794bb0caaad1b78b08dfa16240d5a /tests | |
| parent | 9bd6b233b38f8ae0de72f41939be0cb2879b9919 (diff) | |
Diagnose cyclic references in inheritance graph. (#3811)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bugs/gh-3808.slang | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/bugs/gh-3808.slang b/tests/bugs/gh-3808.slang new file mode 100644 index 000000000..088a41985 --- /dev/null +++ b/tests/bugs/gh-3808.slang @@ -0,0 +1,22 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly + +// CHECK: cyclic reference +interface IFoo { void ff(); } +interface I : IFoo,K { void doThing(); } // ': I' is the problem. +interface J : K {} +interface K : I { void doThingK(); } +struct S<T: I> { + T t; +} + +void t<T : I>(T j) +{ + j.doThing(); +} + +[shader("compute")] +[numthreads(1,1,1)] +void main() +{ + +}
\ No newline at end of file |
