示例#1
0
        #pragma warning restore 0414
        #pragma warning restore 649

    public static void Test()
    {
        object x1 = new RecursiveClass2 <int>();
        object x2 = new RecursiveStruct2 <int>(3);
        object x3 = new NonRecursiveClass2 <int>();
        object x4 = new NonRecursiveStruct2 <int>(3);
        object x5 = new ExpansiveClass2 <int>();
        object x6 = new ExpansiveStruct2 <int>(3);

        object y1 = new RecursiveClass2 <string>();
        object y2 = new RecursiveStruct2 <string>(3);
        object y3 = new NonRecursiveClass2 <string>();
        object y4 = new NonRecursiveStruct2 <string>(3);
        object y5 = new ExpansiveClass2 <string>();
        object y6 = new ExpansiveStruct2 <string>(3);
    }
示例#2
0
 public RecursiveClass2 <A> f2; //TODO: Assign to default value after compile supports T.default
 public RecursiveStruct2(int x)
 {
     f1 = null; f2 = null;
 }
示例#3
0
 public RecursiveClass1(RecursiveClass2 class2)
 {
     _class2 = class2;
 }