summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/lambda/coerce-to-functype.slang
blob: 9ec430defe5d7fea59ee158454cf4156dee0a268 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//TEST:INTERPRET(filecheck=CHECK):

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

func main()
{
    let result = test((int x, int y)=>x+y);
    // CHECK: 15.0
    printf("%f\n", result);
}