yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
455604834
master
1//TEST:INTERPRET(filecheck=CHECK): 2interface IBar 3{} 4 5interface IFoo : IBar 6{ 7 void execute(); 8} 9 10struct Impl : IFoo 11{ 12 void execute() 13 { 14 printf("Impl::execute();\n"); 15 } 16} 17 18extension<T:IBar> T : IFoo 19{ 20 void execute() 21 { 22 printf("Extension::execute();\n"); 23 } 24} 25 26struct Base : IBar{} 27 28void test<T:IFoo>(T t) 29{ 30 t.execute(); 31} 32 33void main() 34{ 35 // CHECK: Impl::execute(); 36 Impl f; 37 test(f); 38 // CHECK: Extension::execute(); 39 Base b; 40 test(b); 41}