yum-mirror/slang

Making it easier to work with shaders

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

Yong HeSupport `expand` on concrete tuple values. (#8106)7cd8130e1

master
433 B25 linesraw
1//TEST:INTERPRET(filecheck=CHECK):
2
3func foo(f : functype (float) -> int) -> int{
4    return f(0);
5}
6
7int bit<T>(T) {
8    return 10;
9}
10
11int bit<T, let N : int>(vector<T, N>) {
12    return 1;
13}
14
15int zit() {
16    // even though foo is overloaded, we should still be able to infer that we want bit<T>
17    // based on the parameter (expected) type.
18    return foo(bit<float>);
19}
20
21void main()
22{
23    // CHECK: 10
24    printf("%d\n", zit());
25}