Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes
[mono.git] / mcs / tests / gtest-010.cs
1 // Type parameters with constraints: check whether we can invoke
2 // things on the constrained type.
3
4 using System;
5
6 interface I
7 {
8         void Hello ();
9 }
10
11 class J
12 {
13         public void Foo ()
14         {
15                 Console.WriteLine ("Foo!");
16         }
17 }
18
19 class Stack<T>
20         where T : J, I
21 {
22         public void Test (T t)
23         {
24                 t.Hello ();
25                 t.Foo ();
26         }
27 }
28
29 class Test
30 {
31 }
32
33 class X
34 {
35         public static void Main()
36         {
37         }
38 }