summaryrefslogtreecommitdiffstats
path: root/tests/bugs/generic-uint-value-param.slang
blob: 4d40597325ef3df0803b34dae758d66d9a6c0f7a (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
// generic-uint-value-param.slang

//DIAGNOSTIC_TEST:SIMPLE:

// Regression test to confirm that type checker
// doesn't report warnings for these constant coercions.

struct BoolG<let v : bool>
{ }

struct Test<let v : uint>
{
    int arr[v];
}

static const uint uv = 5;

void t()
{
    BoolG<true> gt;
    BoolG<bool(1)> gt2;
    BoolG<1 != 2> gt3;
    Test<uv> v;
}