summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/lambda/coerce-failure.slang
blob: a5286611cb98d82a5c5667c9652f86fc5c26c8ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//TEST:SIMPLE(filecheck=CHECK): -target spirv


func test(f: functype(int, int)->float) -> float
{
    return f(2,3) + 10.0f;
}


[numthreads(1,1,1)]
void computeMain()
{
    int c = 2;
    // CHECK: ([[# @LINE+1]]): error 30019
    let result = test((int x, int y)=> x + y + c);

    // CHECK: ([[# @LINE+1]]): error 30019
    let result1 = test((int x, float y) => x + y);
}