yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeFix prebound parameter pack - argument list matching logic. (#6111)3666c66e2

master
639 B28 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv
2
3struct Set<each T>
4{
5    Tuple<expand each T> data;
6    void f(expand each T v){}
7    void h<each U>(U x){}
8    void g(expand each T d)
9    {
10        //CHECK-NOT: ([[# @LINE+1]]): error
11        f(expand each d); // OK
12
13        //CHECK-NOT: ([[# @LINE+1]]): error
14        h(54); // OK, specializing free-form parameter U.
15
16        //CHECK: ([[# @LINE+1]]): error
17        f(); // error, cannot call f without arguments.
18
19        //CHECK: ([[# @LINE+1]]): error
20        f(5); // error, cannot call f with different type pack.
21    }
22}
23
24[numthreads(1,1,1)]
25void computeMain()
26{
27    Set<float> v;
28}