summaryrefslogtreecommitdiffstats
path: root/tests/bugs/cyclic-type-2.slang
blob: b7e2aa448e4019869c9e1ed4268d566032bf8048 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
}