Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-461.cs
1 using System;
2
3 namespace Test
4 {
5         public class BaseContext
6         {
7         }
8
9         public class MyDataContext : BaseContext
10         {
11         }
12
13         public abstract class Entity<T>
14         {
15         }
16
17         public class Person : Entity<MyDataContext>
18         {
19         }
20
21         public sealed class TheBox<T> where T : BaseContext
22         {
23                 public U GetById<U> (Guid entityId) where U : Entity<T>
24                 {
25                         return null;
26                 }
27         }
28
29         public class Program
30         {
31                 public static void Main ()
32                 {
33                         TheBox<MyDataContext> dc = new TheBox<MyDataContext> ();
34                         dc.GetById<Person> (Guid.NewGuid ());
35                 }
36         }
37 }
38