summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/unresolved-symbol.slang
blob: d5c8444fc767d947842d134ef0f1a4ba31d3daf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target hlsl -entry main -profile cs_6_0
interface IFoo
{
    int doThing();
}

// CHECK: ([[#@LINE+1]]): error 45001:
extern struct Foo : IFoo;
// CHECK: ([[#@LINE+1]]): error 45001:
extern static const int c;

RWStructuredBuffer<int> output;

void main()
{
    Foo f;
    output[0] = c + f.doThing();
}