[build] Fix warning (#4177)
[mono-project.git] / mcs / tests / gtest-598.cs
blob27bad700e524fa57e57b29d137d099f70b0471e6
1 using System;
3 public class A
5 public virtual T Test<T> (T t)
7 throw new ApplicationException ();
11 public class B : A
13 public override T Test<T> (T t)
15 Console.WriteLine ("Base");
16 return default (T);
20 public class C : B
22 public override T Test<T> (T t)
24 base.Test ("a");
25 return default (T);
30 public class AG<U>
32 public virtual T Test<T> (T t, U u)
34 throw new ApplicationException ();
38 public class B<UB> : AG<UB>
40 public override T Test<T> (T t, UB u)
42 Console.WriteLine ("Base");
43 return default (T);
47 public class C<UC> : B<UC>
49 public override T Test<T> (T t, UC u)
51 base.Test ("a", default (UC));
52 return default (T);
56 class X
58 public static void Main ()
60 new C ().Test<int> (1);
61 new C<int> ().Test (5, 3);