yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
18be2d81f
master
1// diamond.slang 2 3//TEST:SIMPLE: 4 5// Test to confirm that Slang can handle a "diamond" 6// multiple inheritance pattern between interfaces, 7// without having lookup ambiguity issues at use 8// sites. 9 10interface A { float getA(); } 11 12interface B : A {} 13 14interface C : A {} 15 16interface D : B, C {} 17 18float doIt<T : D>(T value) 19{ 20 return value.getA(); 21} 22 23struct Thing : D 24{ 25 float getA() { return 0.0f; } 26} 27 28float test() 29{ 30 Thing thing; 31 return doIt(thing); 32}