Updated with review feedback.
[mono.git] / mcs / tests / gtest-509.cs
1 using System;
2
3 namespace Test
4 {
5         public interface IFoo
6         {
7         }
8
9         public class Foo : IFoo
10         {
11         }
12
13         public interface IBase
14         {
15                 T Get<T> (object o);
16         }
17
18         public class TestClass : IBase
19         {
20                 public T Get<T> (object o)
21                         where T : IFoo
22                 {
23                         return default (T);
24                 }
25
26                 T IBase.Get<T> (object o)
27                 {
28                         return default (T);
29                 }
30
31                 public static void Main (string[] args)
32                 {
33                         Console.WriteLine (new TestClass ().Get<Foo> (null));
34                 }
35         }
36 }