yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeDiagnose cyclic references in inheritance graph. (#3811)dd32414bd

master
370 B22 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly
2
3// CHECK: cyclic reference
4interface IFoo { void ff(); }
5interface I : IFoo,K { void doThing(); } // ': I' is the problem.
6interface J : K {}
7interface K : I { void doThingK(); }
8struct S<T: I> {
9 T t;
10}
11
12void t<T : I>(T j)
13{
14    j.doThing();
15}
16
17[shader("compute")]
18[numthreads(1,1,1)]
19void main()
20{
21
22}