yum-mirror/slang

Making it easier to work with shaders

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

Yong HeAllow lambda exprs without captures to coerce to `functype`. (#7129)9dfd5244a

master
376 B19 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv
2
3
4func test(f: functype(int, int)->float) -> float
5{
6    return f(2,3) + 10.0f;
7}
8
9
10[numthreads(1,1,1)]
11void computeMain()
12{
13    int c = 2;
14    // CHECK: ([[# @LINE+1]]): error 30019
15    let result = test((int x, int y)=> x + y + c);
16
17    // CHECK: ([[# @LINE+1]]): error 30019
18    let result1 = test((int x, float y) => x + y);
19}