Author: massi
Date: 2008-02-04 11:39:31 -0500 (Mon, 04 Feb 2008)
New Revision: 94756
Modified:
trunk/mono/mono/tests/ChangeLog
trunk/mono/mono/tests/iface4.cs
Log:
* iface4.cs: Also added another "level" of inheritance...
Modified: trunk/mono/mono/tests/ChangeLog
===================================================================
--- trunk/mono/mono/tests/ChangeLog 2008-02-04 16:14:00 UTC (rev 94755)
+++ trunk/mono/mono/tests/ChangeLog 2008-02-04 16:39:31 UTC (rev 94756)
@@ -1,5 +1,9 @@
2008-02-04 Massimiliano Mantione <[EMAIL PROTECTED]>
+ * iface4.cs: Also added another "level" of inheritance...
+
+2008-02-04 Massimiliano Mantione <[EMAIL PROTECTED]>
+
* iface4.cs: Tested also Stop method (just to be on the safe side).
2008-01-28 Rodrigo Kumpera <[EMAIL PROTECTED]>
Modified: trunk/mono/mono/tests/iface4.cs
===================================================================
--- trunk/mono/mono/tests/iface4.cs 2008-02-04 16:14:00 UTC (rev 94755)
+++ trunk/mono/mono/tests/iface4.cs 2008-02-04 16:39:31 UTC (rev 94756)
@@ -6,10 +6,15 @@
int Turn ();
}
+public interface IWalker {
+ int Walk ();
+}
+
public class Base : IVehicle {
int IVehicle.Start () { return 1; }
public int Stop () { return 2; }
public virtual int Turn () { return 3; }
+ public int Walk () { return 1; }
}
public class Derived1 : Base {
@@ -28,11 +33,15 @@
public override int Turn () { return 8; }
}
+public class Derived3 : Derived1, IWalker {
+}
+
public class Test {
static int Main () {
Derived1 d1 = new Derived1 ();
Derived2 d2 = new Derived2 ();
+ Derived3 d3 = new Derived3 ();
Base b1 = d1;
Base b2 = d2;
Base rb = new Base ();
@@ -61,6 +70,9 @@
if (((IVehicle)d2).Stop () != 6)
return 8;
+ if (d3.Walk () != 1)
+ return 9;
+
//Console.WriteLine ("TEST {0}", ((IVehicle)b2).Turn ());
return 0;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches