yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
7349dc5cf
master
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): 2interface IThing 3{ 4 void thing(); 5} 6 7void f<T, U>(T t, U u) 8 where optional T: IThing 9 where optional U: IThing 10{ 11 // Error: cannot upgrade optional to non-optional witness in unchecked context. 12 if (U is IThing) 13 { 14 // U being IThing doesn't justify using T as such! 15 t.thing(); // CHECK: error 30403 16 } 17}