Updated with review feedback.
[mono.git] / mcs / tests / gtest-642.cs
1 using System;
2 using System.Collections.Generic;
3
4 class Program
5 {
6         static void Main ()
7         {
8         }
9
10         public static void Transform<V> (Area<V> area, Func<V, V> transform)
11                 where V : IA<V>
12         {
13                 Test (GetIB<V> (), t => Transform2 (null, transform));
14         }
15
16         static IB<W> GetIB<W> ()
17                 where W : IA<W>
18         {
19                 return null;
20         }
21
22         static void Test<T> (T values, Func<T, T> func)
23         {
24         }
25
26         public static IB<U> Transform2<U> (
27                 IB<U> b,
28                 Func<U, U> transform) where U : IA<U>
29         {
30                 return null;
31         }
32 }
33
34
35 public class Area<TVector>
36         where TVector : IA<TVector>
37 {
38         public IB<TVector> GetSegments ()
39         {
40                 return null;
41         }
42 }
43
44 public interface IB<TB>
45         where TB : IA<TB>
46 {
47 }
48
49 public interface IA<T>
50 {
51 }