[mono/tests] Fix out of tree build.
[mono-project.git] / mcs / tests / gtest-571.cs
blob75cd9a2a828ec405ef134aa2494f8c9a1955875f
1 using System;
3 public abstract class A<T>
5 public abstract A<MM> For<MM> () where MM : T;
8 public class B<U, X, V> : A<V>
9 where V : X
10 where X : U
12 readonly A<U> _inner;
14 public B (A<U> inner)
16 _inner = inner;
19 public override A<PP> For<PP> () // base constraint is copied as PP : V
21 return _inner.For<PP> ();
25 public class Test : A<Test>
27 public static void Main ()
29 var t = new Test ();
30 new B<Test, Test, Test> (t).For<Test> ();
33 public override A<QQ> For<QQ> ()
35 return null;