2010-04-13 Sebastien Pouliot <sebastien@ximian.com>
[mono-project.git] / mcs / tests / gtest-316.cs
blobb2139bf8546735816c3416569440203b849a96b2
1 // Bug #79984
2 using System;
4 class X
6 static int Main ()
8 new Derived ().Method<Foo> ();
9 return 0;
13 class Foo
15 public int X;
18 abstract class Base
20 public abstract void Method<R> ()
21 where R : Foo, new ();
24 class Derived : Base
26 public override void Method<S> ()
28 Method2<S> ();
29 // S s = new S ();
30 // Console.WriteLine (s.X);
33 public void Method2<T> ()
34 where T : Foo, new ()
36 T t = new T ();
37 Console.WriteLine (t.X);