1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// extension-visibility-a.slang public interface IThing { public int getValue(); } // Note: not implementing the interface here! public struct MyThing { public int value; } public int helper<T : IThing>(T thing) { return thing.getValue(); }