// // Conversions involving type parameters (26.7.4). // This is a compilation-only test since some of the explict // conversions would trigger an InvalidCastException. // using System; interface Foo { Hello () : void; } class A { } class B : A, Foo { public Hello () : void { } public static @: ( _b : B) : C { C (); } } class C { public static @:> ( _c : C) : B { B (); } } class Test { static Simple[T] (mutable t : T) : void { mutable o = t; t = ( o : T); mutable foo = ( t :> Foo); t = ( foo :> T); } static Interface[T] (mutable t : T) : void { mutable _foo = t; () } static Class[T] (mutable t : T) : void { mutable b = t; mutable a = t; mutable foo = t; t = ( b : T); t = ( a : T); t = ( foo : T); mutable c = t; t = ( c : T); } static Array[T] (mutable t : array [T]) : void { mutable o = t; mutable a = t; t = ( o : array [T]); t = ( a : array [T]); } static Main () : void { } } /* BEGIN-OUTPUT END-OUTPUT */