yum-mirror/slang

Making it easier to work with shaders

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

CopilotAdd warning for comma operators used outside for-loops and expand expressions in legacy mode (#7984)9ed7b5264

master
400 B19 linesraw
1//DIAGNOSTIC_TEST:SIMPLE:
2
3#language 2026
4
5int testCommaOperatorInSlang2026()
6{
7    // In Slang 2026, this creates a tuple - should NOT generate a warning
8    let m = (1, 2, 3);
9    
10    // Test accessing tuple elements
11    let x = m._0;
12    let y = m._1;
13    let z = m._2;
14    
15    // Another tuple example - should NOT generate a warning
16    var t = (1.0f, 2.0f, 3.0f);
17    
18    return x + y + z;
19}