* generic-virtual.2.cs: Delegate test for static generic methods.
svn path=/trunk/mono/; revision=105883
+2008-06-16 Mark Probst <mark.probst@gmail.com>
+
+ * generic-virtual.2.cs: Delegate test for static generic methods.
+
2008-06-14 Kornél Pál <kornelpal@gmail.com>
* mixed-mode: Add x64 target to mixed-mode assembly tests.
public class ClassA {}
public class ClassB {}
+public delegate string[] StringArrayDelegate ();
+
public class Gen<T> {
static bool checkArr<S> (Array arr, int length) {
if (arr.GetType () != typeof (S[]))
public override S[] newArr<S> () {
return new S[5];
}
+
+ public static S[] staticNewArr<S> () {
+ return new S[5];
+ }
}
public class main {
return 1;
if (!gss.test ())
return 1;
+
+ StringArrayDelegate sad = new StringArrayDelegate (GenSubSub.staticNewArr<string>);
+ string[] arr = sad ();
+ if (arr.GetType () != typeof (string[]))
+ return 1;
+ if (arr.Length != 5)
+ return 1;
+
+ sad = new StringArrayDelegate (gss.newArr<string>);
+ arr = sad ();
+ if (arr.GetType () != typeof (string[]))
+ return 1;
+ if (arr.Length != 5)
+ return 1;
+
return 0;
}
}