summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/generic-value-parameter-must-have-type.slang
blob: a7920b86c19c54717249b33350e62520f3bda71c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv

interface ITest
{
    static const uint kValue0;
    static const uint kValue1;
};

// `TValue1` does not have an explicit type, this should fail to compile.
// CHECK: error 30623: a generic value parameter
// Make sure erroneous code is printed out.
// CHECK: let TValue1>
struct TestImpl<let TValue0 : uint, let TValue1> : ITest
{
    static const uint kValue0 = TValue0;
    static const uint kValue1 = TValue1;
};

void computeMain()
{
}