Author: massi
Date: 2007-08-08 05:12:49 -0400 (Wed, 08 Aug 2007)
New Revision: 83647

Added:
   trunk/mono/mono/tests/bug-77127.cs
Modified:
   trunk/mono/mono/tests/ChangeLog
   trunk/mono/mono/tests/Makefile.am
Log:
        * bug-77127.cs: Test for bug #77127.
        * Makefile.am: Added bug-77127.cs.



Modified: trunk/mono/mono/tests/ChangeLog
===================================================================
--- trunk/mono/mono/tests/ChangeLog     2007-08-08 09:12:04 UTC (rev 83646)
+++ trunk/mono/mono/tests/ChangeLog     2007-08-08 09:12:49 UTC (rev 83647)
@@ -1,3 +1,8 @@
+2007-08-08  Massimiliano Mantione  <[EMAIL PROTECTED]>
+
+       * bug-77127.cs: Test for bug #77127.
+       * Makefile.am: Added bug-77127.cs.
+
 2007-08-01  William Holmes  <[EMAIL PROTECTED]>
 
        * Makefile.am: Added bug-82194.2.cs.

Modified: trunk/mono/mono/tests/Makefile.am
===================================================================
--- trunk/mono/mono/tests/Makefile.am   2007-08-08 09:12:04 UTC (rev 83646)
+++ trunk/mono/mono/tests/Makefile.am   2007-08-08 09:12:49 UTC (rev 83647)
@@ -208,6 +208,7 @@
        bug-78311.cs            \
        bug-78653.cs            \
        bug-78656.cs            \
+       bug-77127.cs            \
        interlocked.cs          \
        cross-domain.cs         \
        appdomain-exit.cs       \

Added: trunk/mono/mono/tests/bug-77127.cs
===================================================================
--- trunk/mono/mono/tests/bug-77127.cs  2007-08-08 09:12:04 UTC (rev 83646)
+++ trunk/mono/mono/tests/bug-77127.cs  2007-08-08 09:12:49 UTC (rev 83647)
@@ -0,0 +1,60 @@
+using System;
+
+public interface IX {}
+public interface IY : IX {}
+
+public class X : IX {
+        public override string ToString () {
+                return "X";
+        }
+}
+
+public class Y : IY {
+        public override string ToString () {
+                return "Y";
+        }
+}
+
+public interface IA {
+        IX Prop { get; }
+}
+
+public interface IB : IA {
+        new IY Prop { get; }
+}
+
+public interface IC : IB {
+}
+
+public class A : IA {
+
+        IX IA.Prop {
+                get { return new X (); }
+        }
+}
+
+public class B : A, IA, IB {
+        IX IA.Prop {
+                get { return new Y (); }
+        }
+
+        IY IB.Prop {
+                get { return new Y (); }
+        }
+}
+
+public class C : B, IC {
+}
+
+class MainClass {
+        static int Main(string[] args) {
+                IC c = new C ();
+                IX w = ((IA)c).Prop;
+               if (w.ToString () == "Y") {
+                       return 0;
+               } else {
+                       return 1;
+               }
+                Console.WriteLine (w.ToString ());
+        }
+}

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to