summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/bitfield/non-integral.slang
blob: 9d477c1f8aaeec80affb5707d2b0103874879511 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):

struct S
{
    float foo : 10;
    // CHECK: non-integral.slang([[#@LINE-1]]): error 31301: bit-field type (float) must be an integral type
    S bar : 10;
    // CHECK: non-integral.slang([[#@LINE-1]]): error 31301: bit-field type (S) must be an integral type
};

[numthreads(1, 1, 1)]
void computeMain()
{
}